diff --git a/lib/storage/channel_message_store.dart b/lib/storage/channel_message_store.dart index 769570fb..7bf44bd7 100644 --- a/lib/storage/channel_message_store.dart +++ b/lib/storage/channel_message_store.dart @@ -61,6 +61,9 @@ class ChannelMessageStore { jsonString = legacyJsonString; } } + if (jsonString == null || jsonString.isEmpty) { + jsonString = prefs.getString(keyFor); + } if (jsonString == null || jsonString.isEmpty) { return []; } diff --git a/lib/storage/channel_settings_store.dart b/lib/storage/channel_settings_store.dart index 3b639cd8..3fb00eb6 100644 --- a/lib/storage/channel_settings_store.dart +++ b/lib/storage/channel_settings_store.dart @@ -20,7 +20,7 @@ class ChannelSettingsStore { final prefs = PrefsManager.instance; final key = '$keyFor$channelIndex'; final oldKey = '$_keyPrefix$channelIndex'; - bool? enabled = prefs.getBool(key); + bool? enabled = prefs.getBool(oldKey); if (enabled == null) { // Attempt migration from legacy unscoped key on first load enabled = prefs.getBool(oldKey); diff --git a/lib/storage/community_store.dart b/lib/storage/community_store.dart index 8283cdb8..a81400a6 100644 --- a/lib/storage/community_store.dart +++ b/lib/storage/community_store.dart @@ -39,6 +39,9 @@ class CommunityStore { } } + if (jsonString == null || jsonString.isEmpty) { + jsonString = prefs.getString(keyFor); + } if (jsonString == null || jsonString.isEmpty) { return []; } diff --git a/lib/storage/contact_group_store.dart b/lib/storage/contact_group_store.dart index 5993c556..ce6a0c6e 100644 --- a/lib/storage/contact_group_store.dart +++ b/lib/storage/contact_group_store.dart @@ -31,6 +31,9 @@ class ContactGroupStore { jsonString = legacyJsonString; } } + if (jsonString == null || jsonString.isEmpty) { + jsonString = prefs.getString(keyFor); + } if (jsonString == null || jsonString.isEmpty) { return []; } diff --git a/lib/storage/contact_store.dart b/lib/storage/contact_store.dart index 8f9e84da..a4e2f0d2 100644 --- a/lib/storage/contact_store.dart +++ b/lib/storage/contact_store.dart @@ -33,6 +33,9 @@ class ContactStore { jsonString = legacyJsonString; } } + if (jsonString == null || jsonString.isEmpty) { + jsonString = prefs.getString(keyFor); + } if (jsonString == null || jsonString.isEmpty) { return []; } diff --git a/lib/storage/message_store.dart b/lib/storage/message_store.dart index 722fd074..d5d2fcc8 100644 --- a/lib/storage/message_store.dart +++ b/lib/storage/message_store.dart @@ -50,6 +50,9 @@ class MessageStore { } } + if (jsonString == null || jsonString.isEmpty) { + jsonString = prefs.getString(keyFor); + } if (jsonString == null || jsonString.isEmpty) { return []; } diff --git a/lib/storage/unread_store.dart b/lib/storage/unread_store.dart index eb68898f..3b615b1d 100644 --- a/lib/storage/unread_store.dart +++ b/lib/storage/unread_store.dart @@ -45,6 +45,9 @@ class UnreadStore { jsonString = legacyJsonString; } } + if (jsonString == null || jsonString.isEmpty) { + jsonString = prefs.getString(keyFor); + } if (jsonString == null || jsonString.isEmpty) { return {}; }