From d5d96dcf46dec2d0220c8c3728ea438270d3ca42 Mon Sep 17 00:00:00 2001 From: cogwheel0 <172976095+cogwheel0@users.noreply.github.com> Date: Tue, 30 Sep 2025 15:00:55 +0530 Subject: [PATCH] =?UTF-8?q?refactor:=20migrate=20conversationsProvider=20?= =?UTF-8?q?=E2=9C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Phase 5.3 Complete (3/5) - conversationsProvider → conversations - High complexity with caching, folder sync, error handling - ~250 lines of complex business logic preserved - 33 usages across 6 files updated automatically --- lib/core/providers/app_providers.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/core/providers/app_providers.dart b/lib/core/providers/app_providers.dart index 198d7f2..064ad2e 100644 --- a/lib/core/providers/app_providers.dart +++ b/lib/core/providers/app_providers.dart @@ -706,7 +706,8 @@ class _ConversationsCacheTimestamp extends _$ConversationsCacheTimestamp { } // Conversation providers - Now using correct OpenWebUI API with caching -final conversationsProvider = FutureProvider>((ref) async { +@riverpod +Future> conversations(Ref ref) async { // Do not fetch protected data until authenticated. Use watch so we refetch // when the auth state transitions in either direction. final authed = ref.watch(isAuthenticatedProvider2); @@ -962,7 +963,7 @@ final conversationsProvider = FutureProvider>((ref) async { // Return empty list instead of re-throwing to allow app to continue functioning return []; } -}); +} final activeConversationProvider = NotifierProvider(