]> cat aescling's git repositories - mastodon.git/commit
Fix quickly switching notification filters resulting in empty or incorrect list ...
authorClaire <claire.github-309c@sitedethib.com>
Thu, 25 Aug 2022 15:36:54 +0000 (17:36 +0200)
committeraescling <aescling+gitlab@cat.family>
Mon, 5 Sep 2022 04:28:02 +0000 (00:28 -0400)
commit353894672eb954665d42eac951a34d0fcc2582ce
treef6ba95aafc84e8bc28239d00420dae827735b8df
parentbeef5736499d2ffb226f9e9d12c1967e755d2b30
Fix quickly switching notification filters resulting in empty or incorrect list (#19052)

Follow-up to #18960

The aforementioned PR fixed an issue in which switching notification filters
while notifications were loading prevented the query for the new filter from
running, but another issue remained: if the first query completed after the
second one, its results would override the second one, thus leading to the
same issue.

This commit cancels the first request if it is still running, before issuing
the second one.
app/javascript/mastodon/actions/notifications.js