mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-04 06:04:19 -04:00
Added "download button" with icon and updated onMapTouch
This commit is contained in:
@@ -200,7 +200,6 @@ class MapFragment : ScreenFragment("Map"), Logging {
|
||||
var mapView: MapView? = null
|
||||
|
||||
|
||||
|
||||
private fun showDownloadedRegions() {
|
||||
// Get a list of tile regions that are currently available.
|
||||
tileStore.getAllTileRegions { expected ->
|
||||
@@ -265,6 +264,9 @@ class MapFragment : ScreenFragment("Map"), Logging {
|
||||
//TODO: Setup Style menu for satellite view, street view, & outdoor view
|
||||
// downloadOfflineRegion()
|
||||
}
|
||||
binding.downloadRegion.setOnClickListener {
|
||||
downloadOfflineRegion()
|
||||
}
|
||||
// We might not have a real mapview if running with analytics
|
||||
if ((requireContext().applicationContext as GeeksvilleApplication).isAnalyticsAllowed) {
|
||||
val vIn = viewIn.findViewById<MapView>(R.id.mapView)
|
||||
@@ -478,10 +480,12 @@ class MapFragment : ScreenFragment("Map"), Logging {
|
||||
}
|
||||
|
||||
private val click = OnMapClickListener {
|
||||
if (binding.fabStyleToggle.isVisible) {
|
||||
if (binding.fabStyleToggle.isVisible && binding.downloadRegion.isVisible) {
|
||||
binding.fabStyleToggle.visibility = View.INVISIBLE
|
||||
binding.downloadRegion.visibility = View.INVISIBLE
|
||||
} else {
|
||||
binding.fabStyleToggle.visibility = View.VISIBLE
|
||||
binding.downloadRegion.visibility = View.VISIBLE
|
||||
}
|
||||
return@OnMapClickListener true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user