Verified Commit 0e5a4562 authored by Linus Jahn's avatar Linus Jahn

roster: Highlight the currently opened chat

Closes #163.
parent 9b8a7942
Pipeline #3205 passed with stage
in 4 minutes and 49 seconds
......@@ -62,6 +62,7 @@ Kirigami.ScrollablePage {
ListView {
verticalLayoutDirection: ListView.TopToBottom
focus: true
model: kaidan.rosterModel
delegate: RosterListItem {
id: rosterItem
......@@ -74,6 +75,10 @@ Kirigami.ScrollablePage {
avatarImagePath: kaidan.avatarStorage.getHashOfJid(model.jid) !== "" ?
kaidan.avatarStorage.getAvatarUrl(model.jid) :
kaidan.getResourcePath("images/fallback-avatar.svg")
backgroundColor: {
kaidan.chatPartner == model.jid ? Kirigami.Theme.highlightColor
: Kirigami.Theme.backgroundColor
}
onClicked: {
// first push the chat page
pageStack.push(chatPage, {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment