Solve the problem with mail selecting the next mail and marking it as read when you move a mail by turning off the select-next-row thing for mail

This commit is contained in:
nathangray 2021-03-16 10:39:07 -06:00
parent 244f306422
commit 4fb80bfb3e
3 changed files with 15 additions and 3 deletions

View File

@ -525,7 +525,7 @@ var et2_nextmatch = /** @class */ (function (_super) {
this.controller.deleteRow(uid); this.controller.deleteRow(uid);
} }
// Select & focus next row // Select & focus next row
if (next && next.id) { if (next && next.id && !this.options.disable_selection_advance) {
this.controller._selectionMgr.setSelected(next.id, true); this.controller._selectionMgr.setSelected(next.id, true);
this.controller._selectionMgr.setFocused(next.id, true); this.controller._selectionMgr.setFocused(next.id, true);
} }
@ -2336,6 +2336,12 @@ var et2_nextmatch = /** @class */ (function (_super) {
"description": "Disable the ability to autorefresh the nextmatch on a regular interval. ", "description": "Disable the ability to autorefresh the nextmatch on a regular interval. ",
"default": false "default": false
}, },
"disable_selection_advance": {
"name": "Disable selection advance",
"type": "boolean",
"description": "If a refresh deletes the currently selected row, we normally advance the selection to the next row. Set to true to stop this.",
"default": false
},
"view": { "view": {
"name": "View", "name": "View",
"type": "string", "type": "string",

View File

@ -178,6 +178,12 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2
"description": "Disable the ability to autorefresh the nextmatch on a regular interval. ", "description": "Disable the ability to autorefresh the nextmatch on a regular interval. ",
"default": false "default": false
}, },
"disable_selection_advance": {
"name": "Disable selection advance",
"type": "boolean",
"description": "If a refresh deletes the currently selected row, we normally advance the selection to the next row. Set to true to stop this.",
"default": false
},
"view": { "view": {
"name": "View", "name": "View",
"type": "string", "type": "string",
@ -813,7 +819,7 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2
} }
// Select & focus next row // Select & focus next row
if(next && next.id) if(next && next.id && !this.options.disable_selection_advance)
{ {
this.controller._selectionMgr.setSelected(next.id, true); this.controller._selectionMgr.setSelected(next.id, true);
this.controller._selectionMgr.setFocused(next.id, true); this.controller._selectionMgr.setFocused(next.id, true);

View File

@ -4,7 +4,7 @@
<overlay> <overlay>
<template id="mail.index.splitter" height="100%" template="" lang="" group="0" version="1.9.001"> <template id="mail.index.splitter" height="100%" template="" lang="" group="0" version="1.9.001">
<split dock_side="bottomDock" id="mailSplitter"> <split dock_side="bottomDock" id="mailSplitter">
<nextmatch id="nm" onselect="app.mail.mail_preview" class="" template="mail.index.rows" header_left="mail.index.add" header_right="mail.index.header_right"/> <nextmatch id="nm" onselect="app.mail.mail_preview" class="" template="mail.index.rows" header_left="mail.index.add" header_right="mail.index.header_right" disable_selection_advance="true"/>
<vbox id="mailPreview" width="100%"> <vbox id="mailPreview" width="100%">
<toolbar id="toolbar"/> <toolbar id="toolbar"/>
<box id="blank" disabled="false"> <box id="blank" disabled="false">