mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
refactor: simplify marker update logic by reducing redundant conditions
This commit is contained in:
parent
fc3c530326
commit
cd59c40224
1 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue