mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
mobile: enable sharing via email
Instead of using the save file dialog (which creates a horrendous user experience - and isn't even supported on Android), simply allow the user to email the file in question to a recipient of their choice, e.g., themselves. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
f144fa0a1b
commit
42da08df20
1 changed files with 5 additions and 3 deletions
|
@ -137,7 +137,6 @@ TemplatePage {
|
||||||
|
|
||||||
TemplateRadioButton {
|
TemplateRadioButton {
|
||||||
text: qsTr("Export Subsurface XML")
|
text: qsTr("Export Subsurface XML")
|
||||||
visible: Qt.platform.os !== "android"
|
|
||||||
checked: true
|
checked: true
|
||||||
onClicked: {
|
onClicked: {
|
||||||
selectedExport = ExportType.EX_DIVES_XML
|
selectedExport = ExportType.EX_DIVES_XML
|
||||||
|
@ -146,7 +145,6 @@ TemplatePage {
|
||||||
}
|
}
|
||||||
TemplateRadioButton {
|
TemplateRadioButton {
|
||||||
text: qsTr("Export Subsurface dive sites XML")
|
text: qsTr("Export Subsurface dive sites XML")
|
||||||
visible: Qt.platform.os !== "android"
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
selectedExport = ExportType.EX_DIVE_SITES_XML
|
selectedExport = ExportType.EX_DIVE_SITES_XML
|
||||||
explain.text = qsTr("Subsurface dive sites native XML format.")
|
explain.text = qsTr("Subsurface dive sites native XML format.")
|
||||||
|
@ -209,8 +207,12 @@ TemplatePage {
|
||||||
exportSelection.visible = false
|
exportSelection.visible = false
|
||||||
textPassword.visible = false
|
textPassword.visible = false
|
||||||
uploadDialog.visible = true
|
uploadDialog.visible = true
|
||||||
} else if (Qt.platform.os !== "android") {
|
} else if (Qt.platform.os !== "android" && Qt.platform.os !== "ios") {
|
||||||
saveAsDialog.open()
|
saveAsDialog.open()
|
||||||
|
} else {
|
||||||
|
manager.appendTextToLog("Send export of type " + selectedExport + " via email.")
|
||||||
|
manager.shareViaEmail(selectedExport, anonymize.checked)
|
||||||
|
pageStack.pop()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue