Fix selecting a room in a collapsed account
This commit is contained in:
parent
ffca63653d
commit
9fc347ac10
|
@ -67,11 +67,15 @@ HTileDelegate {
|
|||
mainPaneList.currentIndex = index
|
||||
}
|
||||
|
||||
function toggleCollapse() {
|
||||
window.uiState.collapseAccounts[model.id] = ! collapsed
|
||||
function setCollapse(collapse) {
|
||||
window.uiState.collapseAccounts[model.id] = collapse
|
||||
window.uiStateChanged()
|
||||
}
|
||||
|
||||
function toggleCollapse() {
|
||||
setCollapse(! collapsed)
|
||||
}
|
||||
|
||||
|
||||
Behavior on opacity { HNumberAnimation {} }
|
||||
|
||||
|
|
|
@ -157,27 +157,36 @@ HListView {
|
|||
}
|
||||
|
||||
function activate() {
|
||||
if (! currentItem) incrementCurrentIndex()
|
||||
if (! currentItem) next()
|
||||
|
||||
selectedRoom ?
|
||||
currentItem.roomList.currentItem.activated() :
|
||||
currentItem.account.activated()
|
||||
}
|
||||
|
||||
function accountSettings() {
|
||||
if (! currentItem) incrementCurrentIndex()
|
||||
if (! currentItem) next()
|
||||
|
||||
currentItem.roomList.currentIndex = -1
|
||||
currentItem.account.activated()
|
||||
}
|
||||
|
||||
function addNewChat() {
|
||||
if (! currentItem) incrementCurrentIndex()
|
||||
if (! currentItem) next()
|
||||
|
||||
currentItem.roomList.currentIndex = -1
|
||||
currentItem.account.addChat.clicked()
|
||||
}
|
||||
|
||||
function setCollapseAccount(collapse) {
|
||||
if (! currentItem) return
|
||||
currentItem.account.setCollapse(collapse)
|
||||
}
|
||||
|
||||
function toggleCollapseAccount() {
|
||||
if (mainPane.filter) return
|
||||
if (! currentItem) incrementCurrentIndex()
|
||||
if (! currentItem) next()
|
||||
|
||||
currentItem.account.toggleCollapse()
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,11 @@ HRowLayout {
|
|||
return
|
||||
}
|
||||
|
||||
if (window.settings.clearRoomFilterOnEnter) text = ""
|
||||
if (window.settings.clearRoomFilterOnEnter) {
|
||||
mainPaneList.setCollapseAccount(false)
|
||||
text = ""
|
||||
}
|
||||
|
||||
mainPaneList.requestActivate()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user