gui: fix bypass banner not appearing until session switch
QML's property var change detection doesn't reliably trigger binding updates when comparing to null. Added explicit bool hasPendingBypass property that properly triggers visibility.
This commit is contained in:
parent
a4378c1be4
commit
5882192ae9
|
|
@ -7,6 +7,7 @@ Item {
|
||||||
property bool sidebarVisible: true
|
property bool sidebarVisible: true
|
||||||
property int maxVisibleBlocks: 80
|
property int maxVisibleBlocks: 80
|
||||||
property var pendingBypass: null // {sessionId, id, cmd, cwd}
|
property var pendingBypass: null // {sessionId, id, cmd, cwd}
|
||||||
|
property bool hasPendingBypass: false
|
||||||
signal toggleSidebar()
|
signal toggleSidebar()
|
||||||
// Do not opt the chat pane into focus navigation.
|
// Do not opt the chat pane into focus navigation.
|
||||||
activeFocusOnTab: false
|
activeFocusOnTab: false
|
||||||
|
|
@ -146,7 +147,7 @@ Item {
|
||||||
color: "#fff3e0" // amber light
|
color: "#fff3e0" // amber light
|
||||||
border.color: "#ff9800"
|
border.color: "#ff9800"
|
||||||
border.width: 1
|
border.width: 1
|
||||||
visible: chatPane.pendingBypass !== null
|
visible: chatPane.hasPendingBypass
|
||||||
z: 100
|
z: 100
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
|
@ -189,6 +190,7 @@ Item {
|
||||||
if (chatPane.pendingBypass) {
|
if (chatPane.pendingBypass) {
|
||||||
ollie.resolveBypass(chatPane.pendingBypass.sessionId, chatPane.pendingBypass.id, true)
|
ollie.resolveBypass(chatPane.pendingBypass.sessionId, chatPane.pendingBypass.id, true)
|
||||||
chatPane.pendingBypass = null
|
chatPane.pendingBypass = null
|
||||||
|
chatPane.hasPendingBypass = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -199,6 +201,7 @@ Item {
|
||||||
if (chatPane.pendingBypass) {
|
if (chatPane.pendingBypass) {
|
||||||
ollie.resolveBypass(chatPane.pendingBypass.sessionId, chatPane.pendingBypass.id, false)
|
ollie.resolveBypass(chatPane.pendingBypass.sessionId, chatPane.pendingBypass.id, false)
|
||||||
chatPane.pendingBypass = null
|
chatPane.pendingBypass = null
|
||||||
|
chatPane.hasPendingBypass = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -594,6 +597,7 @@ Connections {
|
||||||
cmd: cmd,
|
cmd: cmd,
|
||||||
cwd: cwd
|
cwd: cwd
|
||||||
}
|
}
|
||||||
|
chatPane.hasPendingBypass = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue