mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 10:09:20 +03:00
Don't reset the message list to page 1 and clear the search on message.show
The `mailbox.message.show` handler rewrote the hash to `mailBox(sFolder)` -- page 1, no search -- even when the user was already in that folder. Because the hash of an open message carries the message id and the new one does not, the two differ, the route fires again, the message is shown again, and the handler runs again: a loop. Every iteration aborts whatever message list request was pending, so browsing to page 2 or running a search silently bounces back to page 1 of the INBOX with an empty search box. Only navigate when we are not already in that folder. Clicking a new-mail notification from another folder still takes you to the INBOX; if the message is not in the current page, the else branch already opens it in the preview pane without touching the list. The same unconditional setHash a few lines below, for non-INBOX folders, gets the same guard.
This commit is contained in:
parent
c154d23cfe
commit
e4ecda0e61
1 changed files with 2 additions and 2 deletions
|
|
@ -303,14 +303,14 @@ export class MailMessageList extends AbstractViewRight {
|
|||
item => sFolder === item?.folder && iUid == item?.uid
|
||||
);
|
||||
|
||||
if ('INBOX' === sFolder) {
|
||||
if ('INBOX' === sFolder && 'INBOX' !== FolderUserStore.currentFolderFullName()) {
|
||||
hasher.setHash(mailBox(sFolder));
|
||||
}
|
||||
|
||||
if (message) {
|
||||
this.selector.selectMessageItem(message);
|
||||
} else {
|
||||
if ('INBOX' !== sFolder) {
|
||||
if ('INBOX' !== sFolder && sFolder !== FolderUserStore.currentFolderFullName()) {
|
||||
hasher.setHash(mailBox(sFolder));
|
||||
}
|
||||
if (sFolder && iUid) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue