refactor: simplify marker update logic by reducing redundant conditions

This commit is contained in:
Rsedp8 2025-05-24 17:16:43 +02:00
parent fc3c530326
commit cd59c40224

View file

@ -2014,17 +2014,17 @@ class NearbyParentFragment : CommonsDaggerSupportFragment(),
if (place.exists && place.pic.trim { it <= ' ' }.isEmpty()) {
shouldUpdateMarker = true
}
} else if (displayExists && !displayNeedsPhoto) {
} else if (displayExists) {
// Exists and all included needs and doesn't needs photo
if (place.exists) {
shouldUpdateMarker = true
}
} else if (!displayExists && displayNeedsPhoto) {
} else if (displayNeedsPhoto) {
// All and only needs photo
if (place.pic.trim { it <= ' ' }.isEmpty()) {
shouldUpdateMarker = true
}
} else if (!displayExists && !displayNeedsPhoto) {
} else {
// all
shouldUpdateMarker = true
}