mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-10-11 13:33:53 -04:00
Simplified some logic
This commit is contained in:
1 parent
40b0cbad06
commit
cc295d0fb3
1 file changed
+11
-9
@@ -622,17 +622,19 @@ class MapFragment : ScreenFragment("Map"), Logging {
|
||||
// Save URI
|
||||
userStyleURI = uri.text.toString()
|
||||
uri.setText("") // clear text
|
||||
|
||||
downloadOfflineRegion(userStyleURI!!)
|
||||
dialog.dismiss()
|
||||
} else {
|
||||
Toast.makeText(
|
||||
requireContext(),
|
||||
"Style URI cannot be empty",
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
}
|
||||
}
|
||||
if (uri.isVisible && (this.userStyleURI != null)) {
|
||||
downloadOfflineRegion(userStyleURI!!)
|
||||
dialog.dismiss()
|
||||
} else {
|
||||
Toast.makeText(
|
||||
requireContext(),
|
||||
"Style URI cannot be empty",
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
downloadOfflineRegion()
|
||||
dialog.dismiss()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user