Commit 20b99d77 authored by Jonah Brüchert's avatar Jonah Brüchert 🌳 Committed by Linus Jahn

RosterPage: Clear TextFields after closing AddContactSheet (#106)

parent 633b3a58
......@@ -24,6 +24,11 @@ import QtQuick.Layouts 1.2
import org.kde.kirigami 2.0 as Kirigami
Kirigami.OverlaySheet {
function clearInput() {
jidField.text = "";
nickField.text = "";
}
ColumnLayout {
Kirigami.Heading {
text: qsTr("Add new contact") + " "
......@@ -54,7 +59,10 @@ Kirigami.OverlaySheet {
Controls.Button {
text: qsTr("Cancel")
onClicked: close()
onClicked: {
clearInput();
close();
}
Layout.fillWidth: true
}
......@@ -63,6 +71,7 @@ Kirigami.OverlaySheet {
enabled: jidField.length > 0
onClicked: {
kaidan.rosterController.addContact(jidField.text, nickField.text);
clearInput();
close();
}
Layout.fillWidth: true
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment