From df8585d877600d8ad73177ffd0003e05b2f4cbd7 Mon Sep 17 00:00:00 2001 From: Jason Whitmore Date: Fri, 2 May 2025 17:26:28 -0700 Subject: [PATCH] ExploreMapFragment.java: remove method call that causes recursive loop Before this commit, there was a call loop that included onScroll and animateTo on the map. These two method calls caused performance issues in ExploreMapFragment. This commit breaks the call loop by removing moveCameraToPosition from getMapCenter. Also, the removed code did not fit the purpose of getMapCenter. --- .../fr/free/nrw/commons/explore/map/ExploreMapFragment.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/src/main/java/fr/free/nrw/commons/explore/map/ExploreMapFragment.java b/app/src/main/java/fr/free/nrw/commons/explore/map/ExploreMapFragment.java index 3041c1e33..b5406b770 100644 --- a/app/src/main/java/fr/free/nrw/commons/explore/map/ExploreMapFragment.java +++ b/app/src/main/java/fr/free/nrw/commons/explore/map/ExploreMapFragment.java @@ -961,9 +961,6 @@ public class ExploreMapFragment extends CommonsDaggerSupportFragment -0.07483536015053005, 1f); } } - if (!isCameFromNearbyMap()) { - moveCameraToPosition(new GeoPoint(latLnge.getLatitude(), latLnge.getLongitude())); - } return latLnge; }