Fix bug where a new contact group added after removing all groups from addressbook wasn't added to the list

bnet/additions
Aleksander Machniak 5 years ago
parent a80da7f678
commit e25f352472

@ -6,6 +6,7 @@ CHANGELOG Roundcube Webmail
- Fix unread count after purge on a folder that is not currently selected (#7051)
- Fix bug where Enter key didn't work on messages list in "List" layout (#7052)
- Fix bug where deleting a saved search in addressbook caused display issue on sources/groups list (#7061)
- Fix bug where a new contact group added after removing all groups from addressbook wasn't added to the list
RELEASE 1.4.1
-------------

@ -368,8 +368,14 @@ function rcube_treelist_widget(node, p)
// insert as child of an existing node
if (parent_node) {
node.level = parent_node.level + 1;
if (!parent_node.children)
parent_node.children = [];
else {
// Remove deleted nodes from the parent to make sure re-rendering below
// happens when adding a new child to a parent with all nodes removed
parent_node.children = parent_node.children.filter(function(node) { return !node.deleted; });
}
search_active = false;
parent_node.children.push(node);

Loading…
Cancel
Save