mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-09-21 07:46:06 +08:00
Clear the “marked as read” state so drilling back into a thread marks it again #617
This commit is contained in:
parent
5ce6d3a09f
commit
5cae7f4fe7
|
@ -168,7 +168,12 @@ class MessageStore extends MailspringStore {
|
|||
|
||||
_onApplyFocusChange() {
|
||||
const focused = FocusedContentStore.focused('thread');
|
||||
if (this.threadId() === (focused ? focused.id : undefined)) return;
|
||||
if (focused === null) {
|
||||
this._lastMarkedAsReadThreadId = null;
|
||||
}
|
||||
|
||||
// if we already match the desired state, no need to trigger
|
||||
if (this.threadId() === (focused || {}).id) return;
|
||||
|
||||
this._thread = focused;
|
||||
this._items = [];
|
||||
|
@ -195,8 +200,8 @@ class MessageStore extends MailspringStore {
|
|||
// prompts (since this is a passive action vs. a user-triggered
|
||||
// action.)
|
||||
if (!this._thread) return;
|
||||
if (this._lastLoadedThreadId === this._thread.id) return;
|
||||
this._lastLoadedThreadId = this._thread.id;
|
||||
if (this._lastMarkedAsReadThreadId === this._thread.id) return;
|
||||
this._lastMarkedAsReadThreadId = this._thread.id;
|
||||
|
||||
if (this._thread.unread) {
|
||||
const markAsReadDelay = AppEnv.config.get('core.reading.markAsReadDelay');
|
||||
|
|
Loading…
Reference in a new issue