Don't show the map if there's no locations available
It's hard to the read the text when there's a beige map behind it, and
unnecessary anyway.
(cherry picked from commit f278cc0c86)
This commit is contained in:
@@ -21,6 +21,7 @@ Kirigami.Page {
|
||||
id: mapView
|
||||
anchors.fill: parent
|
||||
map.plugin: OsmLocationPlugin.plugin
|
||||
visible: mapView.map.mapItems.length !== 0
|
||||
|
||||
map.center: {
|
||||
let c = LocationHelper.center(LocationHelper.unite(locationsModel.boundingBox, liveLocationsModel.boundingBox));
|
||||
@@ -52,11 +53,6 @@ Kirigami.Page {
|
||||
delegate: LocationMapItem {}
|
||||
}
|
||||
|
||||
Kirigami.PlaceholderMessage {
|
||||
text: i18n("There are no locations shared in this room.")
|
||||
visible: mapView.map.mapItems.length === 0
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
Connections {
|
||||
target: mapView.map
|
||||
function onCopyrightLinkActivated() {
|
||||
@@ -64,4 +60,10 @@ Kirigami.Page {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Kirigami.PlaceholderMessage {
|
||||
text: i18n("There are no locations shared in this room.")
|
||||
visible: mapView.map.mapItems.length === 0
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user