look aheead limit defined by user

This commit is contained in:
davmar
2026-09-10 09:31:11 +02:00
parent 200ff72e2e
commit 7437cc90ce
5 changed files with 92 additions and 24 deletions
+11
View File
@@ -122,6 +122,17 @@ class StorageService {
return _prefs.setString(StorageKeys.themeMode, value);
}
/// Look ahead navigation horizon in years (clamped 1–30, default 5).
int get lookAheadMaxYears {
final raw = _prefs.getInt(StorageKeys.lookAheadMaxYears);
if (raw == null) return 5;
return raw.clamp(1, 30);
}
Future<void> setLookAheadMaxYears(int years) {
return _prefs.setInt(StorageKeys.lookAheadMaxYears, years.clamp(1, 30));
}
bool get useRemoteData => _prefs.getBool(StorageKeys.useRemoteData) ?? false;
Future<void> setUseRemoteData(bool value) {