/* If this is a move to dialog, hide Sent, Outbox and Drafts
folder as no message can be move there according to UI specs */
- if (!priv->show_non_move) {
+ if (retval && !priv->show_non_move) {
if (priv->list_to_move &&
tny_list_get_length (priv->list_to_move) > 0 &&
TNY_IS_FOLDER (instance)) {
return FALSE;
}
+ if (retval && (priv->filter & MODEST_FOLDER_VIEW_FILTER_HIDE_FOLDERS)) {
+ if (TNY_IS_FOLDER (instance))
+ return FALSE;
+ }
+
+ if (retval && (priv->filter & MODEST_FOLDER_VIEW_FILTER_HIDE_LOCAL_FOLDERS)) {
+ if (!modest_tny_folder_store_is_remote (TNY_FOLDER_STORE (instance))) {
+ return FALSE;
+ }
+ }
+
if (retval && (priv->filter & MODEST_FOLDER_VIEW_FILTER_CAN_HAVE_FOLDERS)) {
if (TNY_IS_FOLDER (instance)) {
/* Check folder rules */