Updated room sorting
Change the LastActivity sort order to Activity and update to a more flexible way of sorting based on an order from model roles. Add options to actually switch between Alphabetical and Activity Based on some old work by @tdfischer implements #103
This commit is contained in:
@@ -65,6 +65,29 @@ FormCard.FormCardPage {
|
||||
}
|
||||
}
|
||||
}
|
||||
FormCard.FormHeader {
|
||||
title: i18n("Room list sort order")
|
||||
}
|
||||
FormCard.FormCard {
|
||||
FormCard.FormRadioDelegate {
|
||||
text: i18nc("As in 'sort something based on last activity'", "Activity")
|
||||
checked: Config.sortOrder === 1
|
||||
enabled: !Config.isSortOrderImmutable
|
||||
onToggled: {
|
||||
Config.sortOrder = 1
|
||||
Config.save()
|
||||
}
|
||||
}
|
||||
FormCard.FormRadioDelegate {
|
||||
text: i18nc("As in 'sort something alphabetically'", "Alphabetical")
|
||||
checked: Config.sortOrder === 0
|
||||
enabled: !Config.isSortOrderImmutable
|
||||
onToggled: {
|
||||
Config.sortOrder = 0
|
||||
Config.save()
|
||||
}
|
||||
}
|
||||
}
|
||||
FormCard.FormHeader {
|
||||
title: i18n("Timeline Events")
|
||||
}
|
||||
|
||||
@@ -148,7 +148,6 @@ Kirigami.Page {
|
||||
property bool filterTextJustChanged: false
|
||||
|
||||
sourceModel: root.roomTreeModel
|
||||
roomSortOrder: SortFilterRoomTreeModel.Categories
|
||||
activeSpaceId: spaceDrawer.selectedSpaceId
|
||||
mode: spaceDrawer.showDirectChats ? SortFilterRoomTreeModel.DirectChats : SortFilterRoomTreeModel.Rooms
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user