From 15a514d385b5257dd825a4031adbc0c14b0bfe3d Mon Sep 17 00:00:00 2001 From: cogwheel0 <172976095+cogwheel0@users.noreply.github.com> Date: Sun, 7 Sep 2025 18:51:59 +0530 Subject: [PATCH] refactor: chats drawer ui/ux tweaks 2 --- lib/features/chat/providers/chat_providers.dart | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/features/chat/providers/chat_providers.dart b/lib/features/chat/providers/chat_providers.dart index 2d3197b..53854a3 100644 --- a/lib/features/chat/providers/chat_providers.dart +++ b/lib/features/chat/providers/chat_providers.dart @@ -425,6 +425,13 @@ class ChatMessagesNotifier extends StateNotifier> { lastMessage.copyWith(isStreaming: false, content: cleaned), ]; _cancelTypingGuard(); + + // Trigger a refresh of the conversations list so UI like the Chats Drawer + // can pick up updated titles and ordering once streaming completes. + // Best-effort: ignore if ref lifecycle/context prevents invalidation. + try { + _ref.invalidate(conversationsProvider); + } catch (_) {} } @override