From b3309f7b4e706a4559b594d98be722b3ed86dc4a Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Sun, 8 Oct 2023 14:07:02 +0200 Subject: [PATCH] Cleanup messagelist UpOrDown handling --- dev/View/User/MailBox/MessageList.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dev/View/User/MailBox/MessageList.js b/dev/View/User/MailBox/MessageList.js index 2699e69b0..96096cfdf 100644 --- a/dev/View/User/MailBox/MessageList.js +++ b/dev/View/User/MailBox/MessageList.js @@ -256,13 +256,13 @@ export class MailMessageList extends AbstractViewRight { this.selector.on('UpOrDown', up => { if (!MessagelistUserStore.hasChecked()) { - let page = MessagelistUserStore.page(); - up ? --page : ++page; + up = up ? -1 : 1; + const page = MessagelistUserStore.page() + up; if (page > 0 && page <= MessagelistUserStore.pageCount()) { if (SettingsUserStore.usePreviewPane() || MessageUserStore.message()) { - this.selector.iSelectNextHelper = up ? -1 : 1; + this.selector.iSelectNextHelper = up; } else { - this.selector.iFocusedNextHelper = up ? -1 : 1; + this.selector.iFocusedNextHelper = up; } this.selector.unselect(); this.gotoPage(page);