make search history entry count configurable

This commit is contained in:
Fabian Freund
2026-02-04 06:49:28 +01:00
parent 2bf38692a1
commit f9b95f1507
14 changed files with 247 additions and 9 deletions
@@ -83,6 +83,7 @@ class GeneralSettings with FastEquatable {
final bool pullToRefreshEnabled;
final bool doubleBackCloseTab;
final Duration unassignedTabsAutoCleanInterval;
final int maxSearchHistoryEntries;
GeneralSettings({
required this.themeMode,
@@ -108,6 +109,7 @@ class GeneralSettings with FastEquatable {
required this.pullToRefreshEnabled,
required this.doubleBackCloseTab,
required this.unassignedTabsAutoCleanInterval,
required this.maxSearchHistoryEntries,
});
GeneralSettings.withDefaults({
@@ -134,6 +136,7 @@ class GeneralSettings with FastEquatable {
bool? pullToRefreshEnabled,
bool? doubleBackCloseTab,
Duration? unassignedTabsAutoCleanInterval,
int? maxSearchHistoryEntries,
}) : themeMode = themeMode ?? ThemeMode.dark,
enableReadability = enableReadability ?? true,
enforceReadability = enforceReadability ?? false,
@@ -160,7 +163,8 @@ class GeneralSettings with FastEquatable {
pullToRefreshEnabled = pullToRefreshEnabled ?? true,
doubleBackCloseTab = doubleBackCloseTab ?? true,
unassignedTabsAutoCleanInterval =
unassignedTabsAutoCleanInterval ?? Duration.zero;
unassignedTabsAutoCleanInterval ?? Duration.zero,
maxSearchHistoryEntries = maxSearchHistoryEntries ?? 5;
factory GeneralSettings.fromJson(Map<String, dynamic> json) =>
_$GeneralSettingsFromJson(json);
@@ -192,5 +196,6 @@ class GeneralSettings with FastEquatable {
pullToRefreshEnabled,
doubleBackCloseTab,
unassignedTabsAutoCleanInterval,
maxSearchHistoryEntries,
];
}