✨ Grouped chat
This commit is contained in:
@@ -36,6 +36,7 @@ const kAppThemeMode = 'app_theme_mode';
|
||||
const kMaterialYouToggleStoreKey = 'app_theme_material_you';
|
||||
const kAppDisableAnimation = 'app_disable_animation';
|
||||
const kAppFabPosition = 'app_fab_position';
|
||||
const kAppGroupedChatList = 'app_grouped_chat_list';
|
||||
const kFeaturedPostsCollapsedId =
|
||||
'featured_posts_collapsed_id'; // Key for storing the ID of the collapsed featured post
|
||||
|
||||
@@ -100,6 +101,7 @@ sealed class AppSettings with _$AppSettings {
|
||||
required bool useMaterial3,
|
||||
required bool disableAnimation,
|
||||
required String fabPosition,
|
||||
required bool groupedChatList,
|
||||
}) = _AppSettings;
|
||||
}
|
||||
|
||||
@@ -128,6 +130,7 @@ class AppSettingsNotifier extends _$AppSettingsNotifier {
|
||||
useMaterial3: prefs.getBool(kMaterialYouToggleStoreKey) ?? true,
|
||||
disableAnimation: prefs.getBool(kAppDisableAnimation) ?? false,
|
||||
fabPosition: prefs.getString(kAppFabPosition) ?? 'center',
|
||||
groupedChatList: prefs.getBool(kAppGroupedChatList) ?? false,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -291,6 +294,12 @@ class AppSettingsNotifier extends _$AppSettingsNotifier {
|
||||
prefs.setString(kAppFabPosition, value);
|
||||
state = state.copyWith(fabPosition: value);
|
||||
}
|
||||
|
||||
void setGroupedChatList(bool value) {
|
||||
final prefs = ref.read(sharedPreferencesProvider);
|
||||
prefs.setBool(kAppGroupedChatList, value);
|
||||
state = state.copyWith(groupedChatList: value);
|
||||
}
|
||||
}
|
||||
|
||||
final updateInfoProvider =
|
||||
|
||||
Reference in New Issue
Block a user