Skip to content

Commit

Permalink
Scroll to read marker: pull more history when read marker is not loaded
Browse files Browse the repository at this point in the history
This is yet another workaround for what should be fixed in #799.
  • Loading branch information
KitsuneRal committed Oct 1, 2021
1 parent a6b4e0c commit 775245d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions client/qml/Timeline.qml
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,12 @@ Page {
source: "qrc:///scrollup.svg"
}

onClicked: chatView.scrollViewTo(messageModel.readMarkerVisualIndex,
ListView.Center, true)
onClicked: {
if (messageModel.readMarkerVisualIndex < chatView.count)
chatView.scrollViewTo(messageModel.readMarkerVisualIndex,
ListView.Center, true)
else
room.getPreviousContent(chatView.count / 2) // FIXME, #799
}
}
}

0 comments on commit 775245d

Please sign in to comment.