From d7e970dcea97abea3d8a6868441865752da6bc76 Mon Sep 17 00:00:00 2001 From: shenlong <139912620+shalong-tanwen@users.noreply.github.com> Date: Fri, 29 Sep 2023 14:51:54 +0000 Subject: [PATCH] fix(mobile): reduce server version api calls (#4265) --- mobile/lib/modules/album/views/sharing_page.dart | 1 + mobile/lib/routing/tab_navigation_observer.dart | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/mobile/lib/modules/album/views/sharing_page.dart b/mobile/lib/modules/album/views/sharing_page.dart index 1f1745d497..4e62b16c25 100644 --- a/mobile/lib/modules/album/views/sharing_page.dart +++ b/mobile/lib/modules/album/views/sharing_page.dart @@ -117,6 +117,7 @@ class SharingPage extends HookConsumerWidget { padding: const EdgeInsets.only( left: 12.0, right: 12.0, + top: 24.0, bottom: 12.0, ), child: Row( diff --git a/mobile/lib/routing/tab_navigation_observer.dart b/mobile/lib/routing/tab_navigation_observer.dart index c5bc4865b5..5a4ee43984 100644 --- a/mobile/lib/routing/tab_navigation_observer.dart +++ b/mobile/lib/routing/tab_navigation_observer.dart @@ -64,10 +64,10 @@ class TabNavigationObserver extends AutoRouterObserver { } Store.put(StoreKey.currentUser, User.fromDto(userResponseDto)); + ref.read(serverInfoProvider.notifier).getServerVersion(); } catch (e) { debugPrint("Error refreshing user info $e"); } } - ref.watch(serverInfoProvider.notifier).getServerVersion(); } }