Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invert the display_next flag if user holds the shift modifier key while deleting a message #9356

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion program/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3517,11 +3517,19 @@ function rcube_webmail() {

// delete selected messages from the current mailbox
this.delete_messages = function (event, uid) {
var list = this.message_list, trash = this.env.trash_mailbox;
var list = this.message_list, trash = this.env.trash_mailbox,
display_next = this.env.display_next;

// invert the display_next flag in case shift is pressed
if ((list && list.modkey == SHIFT_KEY) || (event && rcube_event.get_modifier(event) == SHIFT_KEY)) {
this.env.display_next = !display_next;
}

// if config is set to flag for deletion
if (this.env.flag_for_deletion) {
this.mark_message('delete', uid);

this.env.display_next = display_next;
return false;
}
// if there isn't a defined trash mailbox or we are in it
Expand All @@ -3544,6 +3552,7 @@ function rcube_webmail() {
}
}

this.env.display_next = display_next;
return true;
};

Expand Down