Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
unreads: Take a missed opportunity for a debugLog to fire when helpful
For this debug check to work, it just needs a known read state for one message. When `oldUnreadsMissing` is false (the common case), the model holds one of two answers for a message's read state: known-unread or known-read. When `oldUnreadsMissing` is true, the model holds known-unread or unknown. Before, we were skipping the debug check on seeing that `oldUnreadsMissing` is true. That's earlier than we need to abort, because the model might still hold a known-unread state for the message. Now, we go ahead with the debug check if that's the case, and still skip it otherwise. Done by using our new `isUnread` helper, in this separate commit because it's not NFC in debug mode.
- Loading branch information