From c6f104afc76bc9cf375b494a8cbdfb34e4858b7e Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Thu, 4 Dec 2025 22:35:45 +0800 Subject: [PATCH] :zap: Keep alive of the chat summary --- lib/pods/chat/chat_room.g.dart | 2 +- lib/pods/chat/chat_summary.dart | 2 +- lib/pods/chat/chat_summary.g.dart | 26 +++++++++++++------------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/lib/pods/chat/chat_room.g.dart b/lib/pods/chat/chat_room.g.dart index 5fc2a7fc..500adda7 100644 --- a/lib/pods/chat/chat_room.g.dart +++ b/lib/pods/chat/chat_room.g.dart @@ -45,7 +45,7 @@ final chatRoomJoinedNotifierProvider = AutoDisposeAsyncNotifierProvider< ); typedef _$ChatRoomJoinedNotifier = AutoDisposeAsyncNotifier>; -String _$chatRoomNotifierHash() => r'978bd602cf5e93e60e3c7b9f5799d46a87495c79'; +String _$chatRoomNotifierHash() => r'1e6391e2ab4eeb114fa001aaa6b06ab2bd646f38'; /// Copied from Dart SDK class _SystemHash { diff --git a/lib/pods/chat/chat_summary.dart b/lib/pods/chat/chat_summary.dart index f2c4ba7b..53d6cbe7 100644 --- a/lib/pods/chat/chat_summary.dart +++ b/lib/pods/chat/chat_summary.dart @@ -60,7 +60,7 @@ class ChatUnreadCountNotifier extends _$ChatUnreadCountNotifier { } } -@riverpod +@Riverpod(keepAlive: true) class ChatSummary extends _$ChatSummary { @override Future> build() async { diff --git a/lib/pods/chat/chat_summary.g.dart b/lib/pods/chat/chat_summary.g.dart index d2cfc93f..0dce026c 100644 --- a/lib/pods/chat/chat_summary.g.dart +++ b/lib/pods/chat/chat_summary.g.dart @@ -24,22 +24,22 @@ final chatUnreadCountNotifierProvider = ); typedef _$ChatUnreadCountNotifier = AutoDisposeAsyncNotifier; -String _$chatSummaryHash() => r'8479ef53cfb0b698b800d0117d04774b6f78b3cc'; +String _$chatSummaryHash() => r'78d927d40cded9d7adbc20bd6f457fdf3c852632'; /// See also [ChatSummary]. @ProviderFor(ChatSummary) -final chatSummaryProvider = AutoDisposeAsyncNotifierProvider< - ChatSummary, - Map ->.internal( - ChatSummary.new, - name: r'chatSummaryProvider', - debugGetCreateSourceHash: - const bool.fromEnvironment('dart.vm.product') ? null : _$chatSummaryHash, - dependencies: null, - allTransitiveDependencies: null, -); +final chatSummaryProvider = + AsyncNotifierProvider>.internal( + ChatSummary.new, + name: r'chatSummaryProvider', + debugGetCreateSourceHash: + const bool.fromEnvironment('dart.vm.product') + ? null + : _$chatSummaryHash, + dependencies: null, + allTransitiveDependencies: null, + ); -typedef _$ChatSummary = AutoDisposeAsyncNotifier>; +typedef _$ChatSummary = AsyncNotifier>; // ignore_for_file: type=lint // ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package