mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
android/usb: simply restart the download after receiving permission
If the user tries to download from a device that he hasn't given the app permission to read from, Android will pop up a dialogue asking for that permission. With this after giving the permission we continue (well, technically, restart) the download which is likely the expected behavior. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
4619b4932e
commit
0b72495413
5 changed files with 70 additions and 12 deletions
|
@ -293,6 +293,24 @@ Kirigami.Page {
|
|||
Layout.fillWidth: true
|
||||
Layout.topMargin: Kirigami.Units.smallSpacing
|
||||
spacing: Kirigami.Units.smallSpacing
|
||||
|
||||
|
||||
function doDownload() {
|
||||
var message = "DCDownloadThread started for " + manager.DC_vendor + " " + manager.DC_product + " on " + manager.DC_devName;
|
||||
message += " downloading " + (manager.DC_forceDownload ? "all" : "only new" ) + " dives";
|
||||
manager.appendTextToLog(message)
|
||||
progressBar.visible = true
|
||||
divesDownloaded = false // this allows the progressMessage to be displayed
|
||||
importModel.startDownload()
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: manager
|
||||
onRestartDownloadSignal: {
|
||||
buttonBar.doDownload()
|
||||
}
|
||||
}
|
||||
|
||||
TemplateButton {
|
||||
id: download
|
||||
text: qsTr("Download")
|
||||
|
@ -322,12 +340,7 @@ Kirigami.Page {
|
|||
manager.DC_bluetoothMode = false;
|
||||
manager.DC_devName = connectionString;
|
||||
}
|
||||
var message = "DCDownloadThread started for " + manager.DC_vendor + " " + manager.DC_product + " on " + manager.DC_devName;
|
||||
message += " downloading " + (manager.DC_forceDownload ? "all" : "only new" ) + " dives";
|
||||
manager.appendTextToLog(message)
|
||||
progressBar.visible = true
|
||||
divesDownloaded = false // this allows the progressMessage to be displayed
|
||||
importModel.startDownload()
|
||||
buttonBar.doDownload()
|
||||
}
|
||||
}
|
||||
TemplateButton {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue