Migrate storage keys to scoped keys across multiple store classes

This commit is contained in:
Winston Lowe
2026-03-12 09:29:46 -07:00
parent 6da54e13c3
commit e6658a6026
11 changed files with 17 additions and 28 deletions
+2 -4
View File
@@ -25,7 +25,7 @@ class CommunityStore {
return [];
}
final prefs = PrefsManager.instance;
String? jsonString = prefs.getString(_keyPrefix);
String? jsonString = prefs.getString(keyFor);
if (jsonString == null || jsonString.isEmpty) {
// Attempt migration from legacy unscoped key on first load
final legacyJsonString = prefs.getString(_keyPrefix);
@@ -38,9 +38,7 @@ class CommunityStore {
jsonString = legacyJsonString;
}
}
if (jsonString == null || jsonString.isEmpty) {
jsonString = prefs.getString(keyFor);
}
if (jsonString == null || jsonString.isEmpty) {
return [];
}