Ver código fonte

hidden background location sharing option

Viktoriia 1 semana atrás
pai
commit
7d13a7959b

+ 4 - 4
src/screens/InAppScreens/MapScreen/FilterModal/index.tsx

@@ -602,7 +602,7 @@ const FilterModal = ({
         // setOpenSettingsBackgroundVisible(true);
         // setOpenSettingsBackgroundVisible(true);
         // }
         // }
       } else {
       } else {
-        await startBackgroundLocationUpdates();
+        // await startBackgroundLocationUpdates();
       }
       }
 
 
       getLocation();
       getLocation();
@@ -652,7 +652,7 @@ const FilterModal = ({
         // setOpenSettingsBackgroundVisible(true);
         // setOpenSettingsBackgroundVisible(true);
         // }
         // }
       } else {
       } else {
-        await startBackgroundLocationUpdates();
+        // await startBackgroundLocationUpdates();
       }
       }
       getLocation();
       getLocation();
     } else if (!canAskAgain || !isServicesEnabled) {
     } else if (!canAskAgain || !isServicesEnabled) {
@@ -697,13 +697,13 @@ const FilterModal = ({
                       accurate.
                       accurate.
                     </Text>
                     </Text>
                   </View>
                   </View>
-                  <View style={styles.bulletItem}>
+                  {/* <View style={styles.bulletItem}>
                     <Text style={styles.bulletIcon}>{'\u2022'}</Text>
                     <Text style={styles.bulletIcon}>{'\u2022'}</Text>
                     <Text style={[styles.text, { flex: 1 }]}>
                     <Text style={[styles.text, { flex: 1 }]}>
                       <Text style={styles.boldText}>In the background</Text> – Your location stays
                       <Text style={styles.boldText}>In the background</Text> – Your location stays
                       up to date even when the app is closed. Other users see your latest location.
                       up to date even when the app is closed. Other users see your latest location.
                     </Text>
                     </Text>
-                  </View>
+                  </View> */}
                   <Text style={[styles.text]}>
                   <Text style={[styles.text]}>
                     You’re always in control, and you can change these settings anytime in the app{' '}
                     You’re always in control, and you can change these settings anytime in the app{' '}
                     <Text
                     <Text

+ 2 - 2
src/screens/InAppScreens/MapScreen/index.tsx

@@ -861,7 +861,7 @@ const MapScreen: any = ({ navigation, route }: { navigation: any; route: any })
         // }
         // }
       } else {
       } else {
         // await startBackgroundLocationUpdates();
         // await startBackgroundLocationUpdates();
-        await restartBackgroundLocationUpdates();
+        // await restartBackgroundLocationUpdates();
       }
       }
 
 
       try {
       try {
@@ -1377,7 +1377,7 @@ const MapScreen: any = ({ navigation, route }: { navigation: any; route: any })
           await stopBackgroundLocationUpdates();
           await stopBackgroundLocationUpdates();
           // }
           // }
         } else {
         } else {
-          await startBackgroundLocationUpdates();
+          // await startBackgroundLocationUpdates();
         }
         }
 
 
         await getLocation();
         await getLocation();

+ 8 - 8
src/screens/LocationSharingScreen/index.tsx

@@ -172,7 +172,7 @@ const LocationSharingScreen = ({ navigation }: { navigation: any }) => {
           // setOpenSettingsBackgroundVisible(true);
           // setOpenSettingsBackgroundVisible(true);
         // }
         // }
       } else {
       } else {
-        await startBackgroundLocationUpdates();
+        // await startBackgroundLocationUpdates();
       }
       }
     } else if (!canAskAgain || !isServicesEnabled) {
     } else if (!canAskAgain || !isServicesEnabled) {
       setOpenSettingsVisible(true);
       setOpenSettingsVisible(true);
@@ -233,7 +233,7 @@ const LocationSharingScreen = ({ navigation }: { navigation: any }) => {
           // setOpenSettingsBackgroundVisible(true);
           // setOpenSettingsBackgroundVisible(true);
         // }
         // }
       } else {
       } else {
-        await startBackgroundLocationUpdates();
+        // await startBackgroundLocationUpdates();
       }
       }
     } else if (!canAskAgain || !isServicesEnabled) {
     } else if (!canAskAgain || !isServicesEnabled) {
       setOpenSettingsVisible(true);
       setOpenSettingsVisible(true);
@@ -271,7 +271,7 @@ const LocationSharingScreen = ({ navigation }: { navigation: any }) => {
         </View>
         </View>
       </TouchableOpacity>
       </TouchableOpacity>
 
 
-      <TouchableOpacity
+      {/* <TouchableOpacity
         style={[
         style={[
           styles.alignStyle,
           styles.alignStyle,
           styles.buttonWrapper,
           styles.buttonWrapper,
@@ -298,7 +298,7 @@ const LocationSharingScreen = ({ navigation }: { navigation: any }) => {
             style={{ transform: 'scale(0.8)' }}
             style={{ transform: 'scale(0.8)' }}
           />
           />
         </View>
         </View>
-      </TouchableOpacity>
+      </TouchableOpacity> */}
 
 
       <View style={{ marginVertical: 12, gap: 6 }}>
       <View style={{ marginVertical: 12, gap: 6 }}>
         <Text style={[textStyles.text, textStyles.boldText]}>
         <Text style={[textStyles.text, textStyles.boldText]}>
@@ -313,13 +313,13 @@ const LocationSharingScreen = ({ navigation }: { navigation: any }) => {
             show your current location to other users who also share theirs
             show your current location to other users who also share theirs
           </Text>
           </Text>
         </View>
         </View>
-        <View style={textStyles.bulletItem}>
+        {/* <View style={textStyles.bulletItem}>
           <Text style={textStyles.bulletIcon}>{'\u2022'}</Text>
           <Text style={textStyles.bulletIcon}>{'\u2022'}</Text>
           <Text style={[textStyles.text, { flex: 1 }]}>
           <Text style={[textStyles.text, { flex: 1 }]}>
             automatically mark regions (and DARE places) as visited in the Regions section as well
             automatically mark regions (and DARE places) as visited in the Regions section as well
             as in the Trips section
             as in the Trips section
           </Text>
           </Text>
-        </View>
+        </View> */}
 
 
         <Text style={[textStyles.text, { marginTop: 6 }]}>
         <Text style={[textStyles.text, { marginTop: 6 }]}>
           You can choose how you want to share your location:
           You can choose how you want to share your location:
@@ -331,14 +331,14 @@ const LocationSharingScreen = ({ navigation }: { navigation: any }) => {
             updates only when you open the app. This uses less battery but may be less accurate.
             updates only when you open the app. This uses less battery but may be less accurate.
           </Text>
           </Text>
         </View>
         </View>
-        <View style={textStyles.bulletItem}>
+        {/* <View style={textStyles.bulletItem}>
           <Text style={textStyles.bulletIcon}>{'\u2022'}</Text>
           <Text style={textStyles.bulletIcon}>{'\u2022'}</Text>
           <Text style={[textStyles.text, { flex: 1 }]}>
           <Text style={[textStyles.text, { flex: 1 }]}>
             <Text style={textStyles.boldText}>In the background</Text> – Your location stays up to
             <Text style={textStyles.boldText}>In the background</Text> – Your location stays up to
             date even when the app is closed. Other users see your latest location, and visited
             date even when the app is closed. Other users see your latest location, and visited
             regions and DARE places are marked automatically.
             regions and DARE places are marked automatically.
           </Text>
           </Text>
-        </View>
+        </View> */}
         <Text style={[textStyles.text]}>
         <Text style={[textStyles.text]}>
           You’re always in control, and you can change these settings anytime in the app{' '}
           You’re always in control, and you can change these settings anytime in the app{' '}
           <Text
           <Text