diff --git a/mail/inc/class.mail_ui.inc.php b/mail/inc/class.mail_ui.inc.php index 13f8c42100..55295bc363 100644 --- a/mail/inc/class.mail_ui.inc.php +++ b/mail/inc/class.mail_ui.inc.php @@ -758,7 +758,16 @@ class mail_ui if (!empty($_folderName)) $fetchCounters = true; - $data = $this->mail_tree->getTree($nodeID,$_profileID,0, false,$subscribedOnly,!$this->mail_bo->mailPreferences['showAllFoldersInFolderPane']); + // Check if it is called for refresh root + // then we need to reinitialized the index tree + if(!$nodeID && !$_profileID) + { + $data = $this->mail_tree->getInitialIndexTree(null,null,null,null,true,!$this->mail_bo->mailPreferences['showAllFoldersInFolderPane']); + } + else + { + $data = $this->mail_tree->getTree($nodeID,$_profileID,0, false,$subscribedOnly,!$this->mail_bo->mailPreferences['showAllFoldersInFolderPane']); + } if (!is_null($_nodeID)) return $data; etemplate_widget_tree::send_quote_json($data); }