Fix infinite scroll loading multiple pages — lock until queue drained
Keep _loading=True during the entire staggered append process. Only unlock after the last post is added to the grid, preventing reached_bottom from triggering new fetches mid-drain.
This commit is contained in:
parent
6524104008
commit
cd3946c494
@ -821,7 +821,6 @@ class BooruApp(QMainWindow):
|
||||
self._status.showMessage(f"{len(self._posts)} results (end)")
|
||||
return
|
||||
self._shown_post_ids.update(p.id for p in posts)
|
||||
QTimer.singleShot(100, self._clear_loading)
|
||||
|
||||
if not hasattr(self, '_append_queue'):
|
||||
self._append_queue = []
|
||||
@ -862,7 +861,8 @@ class BooruApp(QMainWindow):
|
||||
if self._append_queue:
|
||||
QTimer.singleShot(50, self._drain_append_queue)
|
||||
else:
|
||||
# All done — prefetch
|
||||
# All done — unlock loading and prefetch
|
||||
self._loading = False
|
||||
if self._db.get_setting_bool("prefetch_adjacent"):
|
||||
self._prefetch_adjacent(idx)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user