backend: allow users to sort based on last activity

This MR allows an option to prefer the last activity as the most
favorable parameter for sorting.
This commit is contained in:
Soumyadeep Ghosh
2024-12-04 01:45:12 +05:30
committed by Tobias Fella
parent c585f3d8ae
commit 020385c850
3 changed files with 23 additions and 2 deletions

View File

@@ -110,6 +110,16 @@ FormCard.FormCardPage {
NeoChatConfig.save()
}
}
FormCard.FormRadioDelegate {
text: i18nc("As in 'sort something based on the last message'", "Last Message Activity")
description: i18nc("@info", "Rooms with the newest activity will be shown first")
checked: NeoChatConfig.sortOrder === 2
enabled: !NeoChatConfig.isSortOrderImmutable
onToggled: {
NeoChatConfig.sortOrder = 2
NeoChatConfig.save()
}
}
}
FormCard.FormHeader {
title: i18n("Timeline Events")