aboutsummaryrefslogtreecommitdiff
path: root/qml/ComposePane.qml
diff options
context:
space:
mode:
Diffstat (limited to 'qml/ComposePane.qml')
-rw-r--r--qml/ComposePane.qml10
1 files changed, 8 insertions, 2 deletions
diff --git a/qml/ComposePane.qml b/qml/ComposePane.qml
index 2dc24d1..f8f3b6b 100644
--- a/qml/ComposePane.qml
+++ b/qml/ComposePane.qml
@@ -50,13 +50,19 @@ Pane {
Button {
id: attachButton
visible: root.canSend
- text: qsTr("Attach")
+ text: attachFileUrl.length > 0 ? qsTr("Detach") : qsTr("Attach")
Layout.alignment: Qt.AlignBottom
icon.name: "mail-attachment"
- onClicked: attachFileDialog.open()
+ onClicked: {
+ if (attachFileUrl.length > 0) {
+ attachFileUrl = ""
+ } else {
+ attachFileDialog.open()
+ }
+ }
}
TextArea {