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

pull/7066/head
Aleksander Machniak 5 years ago
parent dbc2b5e11c
commit 8d81df7dc3

@ -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