Port away from methods removed in libquotient. This fixes BUG: 497458
(cherry picked from commit b7dee707a3)
Co-authored-by: Jan Rathmann <jan.rathmann@gmx.de>
This commit is contained in:
@@ -198,7 +198,7 @@ Kirigami.Page {
|
|||||||
Shortcut {
|
Shortcut {
|
||||||
sequence: StandardKey.Cancel
|
sequence: StandardKey.Cancel
|
||||||
onActivated: {
|
onActivated: {
|
||||||
if (!timelineViewLoader.item.atYEnd || root.currentRoom.hasUnreadMessages) {
|
if (!timelineViewLoader.item.atYEnd || !root.currentRoom.partiallyReadStats.empty()) {
|
||||||
timelineViewLoader.item.goToLastMessage();
|
timelineViewLoader.item.goToLastMessage();
|
||||||
root.currentRoom.markAllMessagesAsRead();
|
root.currentRoom.markAllMessagesAsRead();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ QQC2.ScrollView {
|
|||||||
padding: Kirigami.Units.largeSpacing
|
padding: Kirigami.Units.largeSpacing
|
||||||
|
|
||||||
z: 2
|
z: 2
|
||||||
visible: (root.currentRoom?.hasUnreadMessages ?? false)
|
visible: (!root.currentRoom?.partiallyReadStats.empty())
|
||||||
|
|
||||||
text: root.currentRoom.readMarkerLoaded ? i18n("Jump to first unread message") : i18n("Jump to oldest loaded message")
|
text: root.currentRoom.readMarkerLoaded ? i18n("Jump to first unread message") : i18n("Jump to oldest loaded message")
|
||||||
action: Kirigami.Action {
|
action: Kirigami.Action {
|
||||||
@@ -195,7 +195,7 @@ QQC2.ScrollView {
|
|||||||
root.focusChatBar();
|
root.focusChatBar();
|
||||||
}
|
}
|
||||||
goReadMarkerFab.textChanged()
|
goReadMarkerFab.textChanged()
|
||||||
messageListView.goToEvent(root.currentRoom.readMarkerEventId);
|
messageListView.goToEvent(root.currentRoom.lastFullyReadEventId);
|
||||||
}
|
}
|
||||||
icon.name: "go-up"
|
icon.name: "go-up"
|
||||||
shortcut: "Shift+PgUp"
|
shortcut: "Shift+PgUp"
|
||||||
@@ -354,7 +354,7 @@ QQC2.ScrollView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function allUnreadVisible() {
|
function allUnreadVisible() {
|
||||||
let readMarkerRow = eventToIndex(root.currentRoom.readMarkerEventId);
|
let readMarkerRow = eventToIndex(root.currentRoom.lastFullyReadEventId);
|
||||||
if (readMarkerRow >= 0 && readMarkerRow < firstVisibleIndex() && messageListView.atYEnd) {
|
if (readMarkerRow >= 0 && readMarkerRow < firstVisibleIndex() && messageListView.atYEnd) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user