What's new and the updater come from AppGraph (no new singleton; singletons_test back at its baseline)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
foxyzandClaude Opus 5.5 committed 2026-10-18 02:22:03 +03:00
1 parent 5bc252bf02
commit d48915dc47
6 files changed
+29 -16

No files matched your search

+3 -3
View File
@@ -61,7 +61,7 @@ abstract class WhatsNewStore {
class SettingsWhatsNewStore implements WhatsNewStore {
final AppSettings settings;
SettingsWhatsNewStore([AppSettings? settings]) : settings = settings ?? AppSettings.instance;
SettingsWhatsNewStore(this.settings);
@override
String? get seen => settings.whatsNewSeen;
@override
@@ -88,14 +88,14 @@ class MemoryWhatsNewStore implements WhatsNewStore {
Future<void> setNotes(ReleaseNotes notes) async => this.notes = notes;
}
/// Made once by `AppGraph` (the shell and About read it from there).
class WhatsNew {
static final instance = WhatsNew();
final String currentVersion;
final WhatsNewStore store;
WhatsNew({this.currentVersion = appVersion, WhatsNewStore? store}) : store = store ?? SettingsWhatsNewStore();
WhatsNew({this.currentVersion = appVersion, required this.store});
/// The card to show now (once); null when there is none.
final due = ValueNotifier<ReleaseNotes?>(null);