From f049cc868f19c5c93817825acb09411bd0b0a181 Mon Sep 17 00:00:00 2001 From: Sujal-Gupta-SG Date: Fri, 7 Feb 2025 12:27:43 +0530 Subject: [PATCH] Migrated --- .../free/nrw/commons/contributions/MainActivity.kt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/fr/free/nrw/commons/contributions/MainActivity.kt b/app/src/main/java/fr/free/nrw/commons/contributions/MainActivity.kt index 8d6efd664..a61567393 100644 --- a/app/src/main/java/fr/free/nrw/commons/contributions/MainActivity.kt +++ b/app/src/main/java/fr/free/nrw/commons/contributions/MainActivity.kt @@ -28,6 +28,7 @@ import fr.free.nrw.commons.navtab.NavTabLayout import fr.free.nrw.commons.navtab.NavTabLoggedOut import fr.free.nrw.commons.nearby.Place import fr.free.nrw.commons.nearby.fragments.NearbyParentFragment +import fr.free.nrw.commons.nearby.fragments.NearbyParentFragment.NearbyParentFragmentInstanceReadyCallback import fr.free.nrw.commons.notification.NotificationActivity.Companion.startYourself import fr.free.nrw.commons.notification.NotificationController import fr.free.nrw.commons.quiz.QuizChecker @@ -460,11 +461,12 @@ after opening the app. fun centerMapToPlace(place: Place?) { setSelectedItemId(NavTab.NEARBY.code()) - nearbyParentFragment!!.setNearbyParentFragmentInstanceReadyCallback { - nearbyParentFragment!!.centerMapToPlace( - place - ) - } + nearbyParentFragment!!.setNearbyParentFragmentInstanceReadyCallback( + object : NearbyParentFragmentInstanceReadyCallback { + override fun onReady() { + nearbyParentFragment!!.centerMapToPlace(place) + } + }) } /**