You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@chrisbobbe pointed out on #5552 that in queueMarkAsRead.js, where we keep a queue of messages the user wants to mark as read:
[…] there's also the flaw where we're storing per-account state at a module's toplevel:
let unsentMessageIds: number[] = [];
let lastSentTime = -Infinity;
let timeout = null;
This is similar to #5009, in that it means that we have ongoing activity which is meant for the particular account that's currently active, and when the active account changes we may start treating it as if it were meant for the new active account.
Instead, much like the solution described in #5009: when we go to process this queue, we should check if the account we're about to act for is the same one that the existing queue was meant for, if it's nonempty. If not, we should discard the existing contents of the queue.
In the future as part of #5005, this will naturally get resolved because we'll have potentially several mark-as-read queues active where we're trying to mark messages as read on several different accounts. But there's no need to wait for that.
The text was updated successfully, but these errors were encountered:
@chrisbobbe pointed out on #5552 that in
queueMarkAsRead.js
, where we keep a queue of messages the user wants to mark as read:This is similar to #5009, in that it means that we have ongoing activity which is meant for the particular account that's currently active, and when the active account changes we may start treating it as if it were meant for the new active account.
Instead, much like the solution described in #5009: when we go to process this queue, we should check if the account we're about to act for is the same one that the existing queue was meant for, if it's nonempty. If not, we should discard the existing contents of the queue.
In the future as part of #5005, this will naturally get resolved because we'll have potentially several mark-as-read queues active where we're trying to mark messages as read on several different accounts. But there's no need to wait for that.
The text was updated successfully, but these errors were encountered: