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
|
- Correctly handle room topics containing new lines, hard tabs or text inside
|
||||||
`<>` brackets
|
`<>` 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
|
## 0.5.0
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
1
TODO.md
1
TODO.md
|
@ -1,7 +1,6 @@
|
||||||
# TODO
|
# TODO
|
||||||
|
|
||||||
- fix cursor over field
|
- fix cursor over field
|
||||||
- update room highlight when creating new room
|
|
||||||
- keyerror when forgetting room while loading members
|
- keyerror when forgetting room while loading members
|
||||||
|
|
||||||
## Refactoring
|
## Refactoring
|
||||||
|
|
|
@ -32,7 +32,7 @@ HListView {
|
||||||
|
|
||||||
onLeftClicked: showItemAtIndex(model.index)
|
onLeftClicked: showItemAtIndex(model.index)
|
||||||
onCollapsedChanged:
|
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() {
|
function setCorrectCurrentItem() {
|
||||||
if (! currentShouldBeRoom && ! currentShouldBeAccount) {
|
if (! currentShouldBeRoom && ! currentShouldBeAccount) {
|
||||||
currentIndex = -1
|
currentIndex = -1
|
||||||
|
@ -196,7 +200,7 @@ HListView {
|
||||||
Connections {
|
Connections {
|
||||||
target: pageLoader
|
target: pageLoader
|
||||||
onPreviousShown:
|
onPreviousShown:
|
||||||
if (setCorrectCurrentItem() === false) correctTimer.start()
|
if (setCorrectCurrentItem() === false) startCorrectItemSearch()
|
||||||
}
|
}
|
||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
|
|
|
@ -31,6 +31,7 @@ HBox {
|
||||||
py.callClientCoro(userId, "new_group_chat", args, roomId => {
|
py.callClientCoro(userId, "new_group_chat", args, roomId => {
|
||||||
button.loading = false
|
button.loading = false
|
||||||
pageLoader.showRoom(userId, roomId)
|
pageLoader.showRoom(userId, roomId)
|
||||||
|
mainPane.roomList.startCorrectItemSearch()
|
||||||
|
|
||||||
}, (type, args) => {
|
}, (type, args) => {
|
||||||
button.loading = false
|
button.loading = false
|
||||||
|
|
|
@ -31,6 +31,7 @@ HBox {
|
||||||
button.loading = false
|
button.loading = false
|
||||||
errorMessage.text = ""
|
errorMessage.text = ""
|
||||||
pageLoader.showRoom(userId, roomId)
|
pageLoader.showRoom(userId, roomId)
|
||||||
|
mainPane.roomList.startCorrectItemSearch()
|
||||||
|
|
||||||
}, (type, args) => {
|
}, (type, args) => {
|
||||||
button.loading = false
|
button.loading = false
|
||||||
|
|
|
@ -31,6 +31,7 @@ HBox {
|
||||||
button.loading = false
|
button.loading = false
|
||||||
errorMessage.text = ""
|
errorMessage.text = ""
|
||||||
pageLoader.showRoom(userId, roomId)
|
pageLoader.showRoom(userId, roomId)
|
||||||
|
mainPane.roomList.startCorrectItemSearch()
|
||||||
|
|
||||||
}, (type, args) => {
|
}, (type, args) => {
|
||||||
button.loading = false
|
button.loading = false
|
||||||
|
|
Loading…
Reference in New Issue
Block a user