From 135831b11684b043ae68e911b4420162315807a6 Mon Sep 17 00:00:00 2001 From: djmaze Date: Mon, 29 Mar 2021 14:21:47 +0200 Subject: [PATCH] Drop root folders with \noselect flag Like 'dovecot' which has 'dovecot.sieve' which has no emails --- .../v/0.0.0/app/libraries/RainLoop/Actions/Folders.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Folders.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Folders.php index f1af24421..2bfc28825 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Folders.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Folders.php @@ -36,6 +36,12 @@ trait Folders if ($oFolderCollection instanceof \MailSo\Mail\FolderCollection) { + foreach ($oFolderCollection as $i => $oFolder) { + if (!$oFolder->IsSelectable()) { + unset($oFolderCollection[$i]); + } + } + $oSettingsLocal = $this->SettingsProvider(true)->Load($oAccount); $aSystemFolders = array();