@@ -104,15 +104,27 @@ Kirigami.ScrollablePage {
|
|||||||
source: userEditSheet.connection.localUser.avatarMediaId ? ("image://mxc/" + userEditSheet.connection.localUser.avatarMediaId) : ""
|
source: userEditSheet.connection.localUser.avatarMediaId ? ("image://mxc/" + userEditSheet.connection.localUser.avatarMediaId) : ""
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
id: mouseArea
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
property var fileDialog: null;
|
||||||
onClicked: {
|
onClicked: {
|
||||||
const fileDialog = openFileDialog.createObject(Controls.ApplicationWindow.Overlay)
|
if (fileDialog != null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
fileDialog = openFileDialog.createObject(Controls.ApplicationWindow.Overlay)
|
||||||
|
|
||||||
fileDialog.chosen.connect(function(receivedSource) {
|
fileDialog.chosen.connect(function(receivedSource) {
|
||||||
if (!receivedSource) return
|
mouseArea.fileDialog = null;
|
||||||
parent.source = receivedSource
|
if (!receivedSource) {
|
||||||
})
|
return;
|
||||||
fileDialog.open()
|
}
|
||||||
|
parent.source = receivedSource;
|
||||||
|
});
|
||||||
|
fileDialog.onRejected.connect(function() {
|
||||||
|
mouseArea.fileDialog = null;
|
||||||
|
});
|
||||||
|
fileDialog.open();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user