Skip to content

Commit 218476a

Browse files
authored
fix: rename isDarkTheme property to prevent recursion (#6231)
1 parent fa24b93 commit 218476a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/src/main/java/fr/free/nrw/commons/nearby/fragments/NearbyParentFragment.kt

+4-4
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ class NearbyParentFragment : CommonsDaggerSupportFragment(),
223223
private var view: View? = null
224224
private var scope: LifecycleCoroutineScope? = null
225225
private var presenter: NearbyParentFragmentPresenter? = null
226-
private var isDarkTheme = false
226+
private var _isDarkTheme = false
227227
private var isFABsExpanded = false
228228
private var selectedPlace: Place? = null
229229
private var clickedMarker: Marker? = null
@@ -461,7 +461,7 @@ class NearbyParentFragment : CommonsDaggerSupportFragment(),
461461
}
462462
}
463463
}
464-
isDarkTheme = systemThemeUtils?.isDeviceInNightMode() == true
464+
_isDarkTheme = systemThemeUtils?.isDeviceInNightMode() == true
465465
if (Utils.isMonumentsEnabled(Date())) {
466466
binding?.rlContainerWlmMonthMessage?.visibility = View.VISIBLE
467467
} else {
@@ -631,7 +631,7 @@ class NearbyParentFragment : CommonsDaggerSupportFragment(),
631631
* another refactor
632632
*/
633633
private fun initThemePreferences() {
634-
if (isDarkTheme) {
634+
if (_isDarkTheme) {
635635
binding!!.bottomSheetNearby.rvNearbyList.setBackgroundColor(
636636
requireContext().resources.getColor(fr.free.nrw.commons.R.color.contributionListDarkBackground)
637637
)
@@ -915,7 +915,7 @@ class NearbyParentFragment : CommonsDaggerSupportFragment(),
915915
}
916916

917917
override fun isDarkTheme(): Boolean {
918-
return isDarkTheme
918+
return _isDarkTheme
919919
}
920920
})
921921
binding!!.nearbyFilterList.root

0 commit comments

Comments
 (0)