mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
git: cleanup: move the saveFilterValues closer to the getFilterValues
Although saveFilterValues doesn't operate any data specific for the range, it is much readable to keep logic of both methods close to each other. GitOrigin-RevId: 2249a1d6c50daf93fc4ac4652c3d372f3f0a3177
This commit is contained in:
committed by
intellij-monorepo-bot
parent
abbf408aed
commit
e8c19cf08e
@@ -136,6 +136,12 @@ class GitUpdateInfoAsLog(private val project: Project,
|
||||
}
|
||||
}
|
||||
|
||||
override fun saveFilterValues(filterName: String, values: List<String>?) {
|
||||
if (filterName !== RANGE_FILTER.name && filterName !== BRANCH_FILTER.name && filterName !== REVISION_FILTER.name) {
|
||||
mainProperties.saveFilterValues(filterName, values)
|
||||
}
|
||||
}
|
||||
|
||||
fun havePresetFilters(): Boolean {
|
||||
val filters = mainProperties.state.FILTERS
|
||||
return if (filters[RANGE_FILTER.name] != null) filters.size > 1 else filters.isNotEmpty()
|
||||
|
||||
@@ -54,11 +54,4 @@ public class GitUpdateProjectInfoLogProperties extends VcsLogUiPropertiesImpl<Gi
|
||||
public void addRecentlyFilteredGroup(@NotNull String filterName, @NotNull Collection<String> values) {
|
||||
VcsLogProjectTabsProperties.addRecentGroup(commonState.RECENT_FILTERS, filterName, values);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveFilterValues(@NotNull String filterName, @Nullable List<String> values) {
|
||||
if (filterName != RANGE_FILTER.getName() && filterName != BRANCH_FILTER.getName() && filterName != REVISION_FILTER.getName()) {
|
||||
super.saveFilterValues(filterName, values);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user