Prevent loading old messages twice on scroll
Whenever the old messages are already loading initially when opening a
conversation, a scroll event might call getOldMessages again which would
cancel the previous one.
The initial old messages load is using includeLastKnown=1 while the others use
0. So if it gets cancelled, we will miss the "last known" message as it
won't be included in subsequent calls.
This fix prevents repeated calls to getOldMessages to avoid the above
issue.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Please register or sign in to comment