Fix bug where next message wasn't displayed after delete in List mode (#7096)

pull/7135/head
Aleksander Machniak 5 years ago
parent cf90c69ad7
commit 29defb82e9

@ -28,6 +28,7 @@ CHANGELOG Roundcube Webmail
- Fix so contact's organization field accepts up to 128 characters (it was 50)
- Fix bug where listing tables in PostgreSQL database with db_prefix didn't work (#7093)
- Fix bug where 'text' attribute on body tag was ignored when displaying HTML message (#7109)
- Fix bug where next message wasn't displayed after delete in List mode (#7096)
RELEASE 1.4.1
-------------

@ -3311,7 +3311,7 @@ function rcube_webmail()
if (this.message_list) {
var n, len, id, root, roots = [],
selection = post_data._uid,
display_next = this.env.display_next && this.preview_id;
display_next = this.check_display_next();
if (selection === '*')
selection = this.message_list.get_selection();
@ -3328,6 +3328,7 @@ function rcube_webmail()
roots.push(root);
}
}
if (remove)
this.message_list.remove_row(id, display_next && n == selection.length-1);
}
@ -3385,6 +3386,11 @@ function rcube_webmail()
return data;
};
this.check_display_next = function()
{
return this.env.display_next && (this.preview_id || !this.env.contentframe);
};
// set a specific flag to one or more messages
this.mark_message = function(flag, uid)
{
@ -3520,7 +3526,7 @@ function rcube_webmail()
list = this.message_list,
rows = list ? list.rows : {},
count = 0,
display_next = this.env.display_next && this.preview_id;
display_next = this.check_display_next();
for (var i=0, len=a_uids.length; i<len; i++) {
uid = a_uids[i];
@ -6520,7 +6526,8 @@ function rcube_webmail()
var n, a_cids = [],
label = action == 'delete' ? 'contactdeleting' : 'movingcontact',
lock = this.display_message(label, 'loading');
lock = this.display_message(label, 'loading'),
display_next = this.check_display_next();
if (this.env.cid)
a_cids.push(this.env.cid);
@ -6528,10 +6535,10 @@ function rcube_webmail()
for (n=0; n<selection.length; n++) {
id = selection[n];
a_cids.push(id);
this.contact_list.remove_row(id, this.env.display_next && this.preview_id && n == selection.length-1);
this.contact_list.remove_row(id, display_next && n == selection.length-1);
}
if (!this.env.display_next)
if (!display_next)
this.contact_list.clear_selection();
}
@ -6731,7 +6738,7 @@ function rcube_webmail()
{
if (this.env.group !== undefined && (this.env.group === props.gid)) {
var n, selection = this.contact_list.get_selection(),
display_next= this.env.display_next && this.preview_id;
display_next= this.check_display_next();
for (n=0; n<selection.length; n++) {
id = selection[n];

Loading…
Cancel
Save