浏览代码

fix(mobile): reduce server version api calls (#4265)

shenlong 1 年之前
父节点
当前提交
d7e970dcea
共有 2 个文件被更改,包括 2 次插入1 次删除
  1. 1 0
      mobile/lib/modules/album/views/sharing_page.dart
  2. 1 1
      mobile/lib/routing/tab_navigation_observer.dart

+ 1 - 0
mobile/lib/modules/album/views/sharing_page.dart

@@ -117,6 +117,7 @@ class SharingPage extends HookConsumerWidget {
         padding: const EdgeInsets.only(
         padding: const EdgeInsets.only(
           left: 12.0,
           left: 12.0,
           right: 12.0,
           right: 12.0,
+          top: 24.0,
           bottom: 12.0,
           bottom: 12.0,
         ),
         ),
         child: Row(
         child: Row(

+ 1 - 1
mobile/lib/routing/tab_navigation_observer.dart

@@ -64,10 +64,10 @@ class TabNavigationObserver extends AutoRouterObserver {
         }
         }
 
 
         Store.put(StoreKey.currentUser, User.fromDto(userResponseDto));
         Store.put(StoreKey.currentUser, User.fromDto(userResponseDto));
+        ref.read(serverInfoProvider.notifier).getServerVersion();
       } catch (e) {
       } catch (e) {
         debugPrint("Error refreshing user info $e");
         debugPrint("Error refreshing user info $e");
       }
       }
     }
     }
-    ref.watch(serverInfoProvider.notifier).getServerVersion();
   }
   }
 }
 }