- folder_empty = modest_main_window_get_style (win);
- if (folder_empty) {
- modest_main_window_set_contents_style (win,
+ if (modest_main_window_get_contents_style (win) == MODEST_MAIN_WINDOW_CONTENTS_STYLE_EMPTY) {
+ folder_view = modest_main_window_get_child_widget (MODEST_MAIN_WINDOW (win),
+ MODEST_WIDGET_TYPE_FOLDER_VIEW);
+ folder = modest_folder_view_get_selected (MODEST_FOLDER_VIEW(folder_view));
+
+
+ folder_empty = (tny_folder_get_all_count (TNY_FOLDER (folder)) == 0);
+
+ if (!folder_empty)
+ modest_main_window_set_contents_style (win,