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
|
id: mapView
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
map.plugin: OsmLocationPlugin.plugin
|
map.plugin: OsmLocationPlugin.plugin
|
||||||
|
visible: mapView.map.mapItems.length !== 0
|
||||||
|
|
||||||
map.center: {
|
map.center: {
|
||||||
let c = LocationHelper.center(LocationHelper.unite(locationsModel.boundingBox, liveLocationsModel.boundingBox));
|
let c = LocationHelper.center(LocationHelper.unite(locationsModel.boundingBox, liveLocationsModel.boundingBox));
|
||||||
@@ -52,11 +53,6 @@ Kirigami.Page {
|
|||||||
delegate: LocationMapItem {}
|
delegate: LocationMapItem {}
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.PlaceholderMessage {
|
|
||||||
text: i18n("There are no locations shared in this room.")
|
|
||||||
visible: mapView.map.mapItems.length === 0
|
|
||||||
anchors.centerIn: parent
|
|
||||||
}
|
|
||||||
Connections {
|
Connections {
|
||||||
target: mapView.map
|
target: mapView.map
|
||||||
function onCopyrightLinkActivated() {
|
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