Update highlighted room when adding new chat
This commit is contained in:
parent
5402a332d2
commit
43ed7b2eb9
|
@ -90,6 +90,9 @@ and this project adheres to
|
|||
- Correctly handle room topics containing new lines, hard tabs or text inside
|
||||
`<>` brackets
|
||||
|
||||
- Starting a direct chat, creating or joining a room will now correctly
|
||||
update the left pane room list's highlighted item
|
||||
|
||||
## 0.5.0
|
||||
|
||||
### Added
|
||||
|
|
1
TODO.md
1
TODO.md
|
@ -1,7 +1,6 @@
|
|||
# TODO
|
||||
|
||||
- fix cursor over field
|
||||
- update room highlight when creating new room
|
||||
- keyerror when forgetting room while loading members
|
||||
|
||||
## Refactoring
|
||||
|
|
|
@ -32,7 +32,7 @@ HListView {
|
|||
|
||||
onLeftClicked: showItemAtIndex(model.index)
|
||||
onCollapsedChanged:
|
||||
if (wantedUserId === model.id) correctTimer.start()
|
||||
if (wantedUserId === model.id) startCorrectItemSearch()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,7 @@ HListView {
|
|||
)
|
||||
)
|
||||
)
|
||||
correctTimer.start()
|
||||
startCorrectItemSearch()
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -165,6 +165,10 @@ HListView {
|
|||
}
|
||||
}
|
||||
|
||||
function startCorrectItemSearch() {
|
||||
correctTimer.start()
|
||||
}
|
||||
|
||||
function setCorrectCurrentItem() {
|
||||
if (! currentShouldBeRoom && ! currentShouldBeAccount) {
|
||||
currentIndex = -1
|
||||
|
@ -196,7 +200,7 @@ HListView {
|
|||
Connections {
|
||||
target: pageLoader
|
||||
onPreviousShown:
|
||||
if (setCorrectCurrentItem() === false) correctTimer.start()
|
||||
if (setCorrectCurrentItem() === false) startCorrectItemSearch()
|
||||
}
|
||||
|
||||
Timer {
|
||||
|
|
|
@ -31,6 +31,7 @@ HBox {
|
|||
py.callClientCoro(userId, "new_group_chat", args, roomId => {
|
||||
button.loading = false
|
||||
pageLoader.showRoom(userId, roomId)
|
||||
mainPane.roomList.startCorrectItemSearch()
|
||||
|
||||
}, (type, args) => {
|
||||
button.loading = false
|
||||
|
|
|
@ -31,6 +31,7 @@ HBox {
|
|||
button.loading = false
|
||||
errorMessage.text = ""
|
||||
pageLoader.showRoom(userId, roomId)
|
||||
mainPane.roomList.startCorrectItemSearch()
|
||||
|
||||
}, (type, args) => {
|
||||
button.loading = false
|
||||
|
|
|
@ -31,6 +31,7 @@ HBox {
|
|||
button.loading = false
|
||||
errorMessage.text = ""
|
||||
pageLoader.showRoom(userId, roomId)
|
||||
mainPane.roomList.startCorrectItemSearch()
|
||||
|
||||
}, (type, args) => {
|
||||
button.loading = false
|
||||
|
|
Loading…
Reference in New Issue
Block a user