feat(@desktop/chat): sort chat by lastMessageTimestamp

closes: #6634
This commit is contained in:
Patryk Osmaczko 2022-08-17 16:48:05 +02:00 committed by osmaczko
parent 781ec30e7f
commit 6339bd5782
1 changed files with 10 additions and 1 deletions

View File

@ -12,6 +12,8 @@ import utils 1.0
import shared 1.0
import shared.popups 1.0
import SortFilterProxyModel 0.2
import "../panels"
import "../popups"
import "../popups/community"
@ -146,7 +148,14 @@ Item {
StatusChatList {
id: channelList
width: scroll.availableWidth
model: root.chatSectionModule.model
model: SortFilterProxyModel {
sourceModel: root.chatSectionModule.model
sorters: RoleSorter {
roleName: "lastMessageTimestamp"
sortOrder: Qt.DescendingOrder
}
}
highlightItem: !root.store.openCreateChat
onChatItemSelected: {
Global.closeCreateChatView()