diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-01-17 13:00:36 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-01-17 13:00:36 +0900 |
commit | 0f43e74bcf06b2b09018d564a73aa931098eb790 (patch) | |
tree | ab93438a04bf91c4a78f279587eca043ab4cf697 /jobs/generated/whoami.cpp | |
parent | ada271e47071681848fdbdecd3aecaa9073091b4 (diff) | |
download | libquotient-0f43e74bcf06b2b09018d564a73aa931098eb790.tar.gz libquotient-0f43e74bcf06b2b09018d564a73aa931098eb790.zip |
Room::getPreviousContent(): Don't skip if the last job just finished
working
The sequence is: RoomMessagesJob::success -> addHistoricalMessageEvents
-> MessageEventModel notification -> QML notification about model reset
-> MessageEventModel completes updating -> QML updates from the model
but by then scrolling has already stopped at the oldest (just loaded)
event -> since there's no momentum, next batch is not fetched. In order
to address this, two things are done: in QML, the current position is
checked in modelReset() handler; in Room (this commit), prev_batch is
updated before historical messages are added (and the model gets
notified, respectively), to prevent firing another job with the old
prev_batch.
Diffstat (limited to 'jobs/generated/whoami.cpp')
0 files changed, 0 insertions, 0 deletions