From 77c79c332517d0197dada529893008031d7dc131 Mon Sep 17 00:00:00 2001 From: cogwheel0 <172976095+cogwheel0@users.noreply.github.com> Date: Thu, 11 Dec 2025 19:05:33 +0530 Subject: [PATCH] refactor(auth): remove unnecessary tools provider invalidation --- lib/core/auth/auth_state_manager.dart | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/core/auth/auth_state_manager.dart b/lib/core/auth/auth_state_manager.dart index 48c036d..ef289f8 100644 --- a/lib/core/auth/auth_state_manager.dart +++ b/lib/core/auth/auth_state_manager.dart @@ -11,7 +11,6 @@ import 'auth_cache_manager.dart'; import 'webview_cookie_helper.dart'; import '../utils/debug_logger.dart'; import '../utils/user_avatar_utils.dart'; -import '../../features/tools/providers/tools_providers.dart'; part 'auth_state_manager.g.dart'; @@ -955,8 +954,10 @@ class AuthStateManager extends _$AuthStateManager { // connection page. Users can navigate to server settings if they need to // change server configuration. - // Invalidate tools provider to clear cached data - ref.invalidate(toolsListProvider); + // Note: toolsListProvider is NOT invalidated here because: + // 1. clearAuthData() already deletes the tools cache from storage + // 2. The provider has auth checks that prevent API calls when logged out + // 3. When user logs back in, the provider will rebuild with fresh data // Clear auth cache manager _cacheManager.clearAuthCache();