Improve the behaviour of jump to last unread message.

Improve the behaviour of jump to last unread message. The view will now jump as high as possible if the last unread message isn't loaded. This at least triggers more items to load which will eventually get the user to the last unread message.
This commit is contained in:
James Graham
2024-05-24 07:55:05 +00:00
parent 415cfd57e7
commit c9ddd9d513
3 changed files with 20 additions and 10 deletions

View File

@@ -10,22 +10,22 @@ import org.kde.kirigami as Kirigami
TimelineDelegate {
id: root
property bool isTemporaryHighlighted: false
onIsTemporaryHighlightedChanged: if (isTemporaryHighlighted) {
temporaryHighlightTimer.start();
}
contentItem: QQC2.ItemDelegate {
padding: Kirigami.Units.largeSpacing
topInset: Kirigami.Units.largeSpacing
topPadding: Kirigami.Units.largeSpacing * 2
property bool isTemporaryHighlighted: false
onIsTemporaryHighlightedChanged: if (isTemporaryHighlighted) {
temporaryHighlightTimer.start();
}
Timer {
id: temporaryHighlightTimer
interval: 1500
onTriggered: isTemporaryHighlighted = false
onTriggered: root.isTemporaryHighlighted = false
}
contentItem: QQC2.Label {