Fix room forget and buttons bugs
This commit is contained in:
@@ -60,6 +60,7 @@ Button {
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
z: 101
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
propagateComposedEvents: true
|
||||
|
@@ -81,26 +81,33 @@ Rectangle {
|
||||
iconName: modelData.iconName
|
||||
display: bannerButtons.displayMode
|
||||
|
||||
onClicked: {
|
||||
if (alreadyClicked) { return }
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
propagateComposedEvents: true
|
||||
onClicked: {
|
||||
if (alreadyClicked) { return }
|
||||
|
||||
iconName = "hourglass"
|
||||
alreadyClicked = true
|
||||
iconName = "hourglass"
|
||||
alreadyClicked = true
|
||||
|
||||
// modelData might become undefined after Backend call
|
||||
var signalId = modelData.signalId
|
||||
var iconName_ = modelData.iconName
|
||||
// modelData might be undefined after Backend call
|
||||
var signalId = modelData.signalId
|
||||
var isForget =
|
||||
modelData.clientFunction === "forgetRoom"
|
||||
|
||||
var future =
|
||||
Backend.clientManager.clients[chatPage.userId].
|
||||
call(modelData.clientFunction,
|
||||
modelData.clientArgs)
|
||||
var future =
|
||||
Backend.clientManager.clients[chatPage.userId].
|
||||
call(modelData.clientFunction,
|
||||
modelData.clientArgs)
|
||||
|
||||
future.onGotResult.connect(function() {
|
||||
iconName = iconName_
|
||||
})
|
||||
if (! isForget) {
|
||||
future.onGotResult.connect(function() {
|
||||
iconName = modelData.iconName
|
||||
})
|
||||
}
|
||||
|
||||
if (signalId) { buttonClicked(signalId) }
|
||||
if (signalId) { buttonClicked(signalId) }
|
||||
}
|
||||
}
|
||||
|
||||
Layout.maximumWidth: bannerButtons.compact ? height : -1
|
||||
|
@@ -111,6 +111,7 @@ Image {
|
||||
Base.HButton {
|
||||
text: qsTr("Login")
|
||||
Layout.fillWidth: true
|
||||
|
||||
}
|
||||
Base.HButton {
|
||||
text: qsTr("Forgot?")
|
||||
|
Reference in New Issue
Block a user