Mobile: don't push map page if it's already on the stack

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2019-10-22 16:21:15 -04:00
parent 4e583f9120
commit f69b93de40

View file

@ -90,7 +90,12 @@ Kirigami.ApplicationWindow {
function showMap() {
if (globalDrawer.drawerOpen)
globalDrawer.close()
pageStack.push(mapPage)
var i=pageIndex(mapPage)
if (i === -1)
pageStack.push(mapPage)
else
pageStack.currentIndex = i
}
function pageIndex(pageToFind) {