Przeglądaj źródła

android series fix

Viktoriia 1 miesiąc temu
rodzic
commit
80d62d4f36

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

@@ -17,11 +17,7 @@ const MarkerItem = ({
   token: string;
 }) => {
   const calloutRef = useRef<MapLibreRN.PointAnnotationRef>(null);
-  useEffect(() => {
-    if (Platform.OS === 'android' && calloutRef.current) {
-      calloutRef.current?.refresh();
-    }
-  }, [marker]);
+
   return (
     <>
       {Platform.OS === 'ios' ? (
@@ -74,6 +70,7 @@ const MarkerItem = ({
         </MapLibreRN.PointAnnotation>
       ) : (
         <MapLibreRN.PointAnnotation
+          key={`${marker.id}-${marker.visited}`}
           id="selected_marker_callout"
           coordinate={marker.coordinates}
           anchor={{ x: 0.5, y: 0.9 }}