浏览代码

android offline maps fix

Viktoriia 3 周之前
父节点
当前提交
38c907cd46
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      src/screens/InAppScreens/MapScreen/index.tsx

+ 6 - 0
src/screens/InAppScreens/MapScreen/index.tsx

@@ -602,6 +602,12 @@ const MapScreen: any = ({ navigation, route }: { navigation: any; route: any })
     }
   }, [netInfo]);
 
+  useEffect(() => {
+    if (Platform.OS === 'android') {
+      MapLibreRN.setConnected(isConnected);
+    }
+  }, [isConnected])
+
   useEffect(() => {
     if (showNomads) {
       refetchUsersLocation();