mobile/DC-download: be more careful exiting download page

Don't just pop the top page off the stack, but pop the download page.
Also explicitly switch to the dive list afterwards.

Additionally, fix a typo in the code that attempts to deal with the
shortcut buttons. I believe that right now this code is completely
broken, but while I contemplate how this should work, let's at least fix
the stupid typo.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2020-03-09 10:52:46 -07:00
parent 8138279a04
commit 90f8c1138e

View file

@ -194,7 +194,7 @@ Kirigami.Page {
if ( curVendor === comboVendor.currentText && curDevice.toUpperCase() === currentText)
rememberedDCsGrid.setDC(curVendor, curProduct, curDevice)
}else if (comboProduct.currentIndex !== -1 && currentText === "FTDI") {
if ( curVendor === comboVendor.currentText && cyrProduct === comboProduct.currentText && curDevice.toUpperCase() === currentText) {
if ( curVendor === comboVendor.currentText && curProduct === comboProduct.currentText && curDevice.toUpperCase() === currentText) {
disableDC(i)
break
}
@ -339,12 +339,16 @@ Kirigami.Page {
onClicked: {
manager.cancelDownloadDC()
if (!progressBar.visible) {
pageStack.pop();
// remove the download page and show dive list
pageStack.pop(downloadFromDc)
rootItem.showDiveList()
download.text = qsTr("Download")
divesDownloaded = false
manager.progressMessage = ""
manager.appendTextToLog("exit DCDownload screen")
} else {
manager.appendTextToLog("cancel download")
}
manager.appendTextToLog("exit DCDownload screen")
}
}
TemplateButton {