[evolution/gnome-3-26] Bug 788051 - Junk messages moved to a real folder are considered seen
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-3-26] Bug 788051 - Junk messages moved to a real folder are considered seen
- Date: Mon, 25 Sep 2017 15:30:35 +0000 (UTC)
commit 6e6c212feb3ad487e4e1c21a2dc009ba3908a174
Author: Milan Crha <mcrha redhat com>
Date: Mon Sep 25 17:28:40 2017 +0200
Bug 788051 - Junk messages moved to a real folder are considered seen
src/mail/message-list.c | 11 ++---------
src/modules/mail/e-mail-shell-view-private.c | 13 ++++++++++++-
2 files changed, 14 insertions(+), 10 deletions(-)
---
diff --git a/src/mail/message-list.c b/src/mail/message-list.c
index 3ed89c2..da715fb 100644
--- a/src/mail/message-list.c
+++ b/src/mail/message-list.c
@@ -4835,7 +4835,6 @@ message_list_set_folder (MessageList *message_list,
g_signal_emit (message_list, signals[MESSAGE_SELECTED], 0, NULL);
if (folder != NULL) {
- CamelStore *store;
gboolean non_trash_folder;
gboolean non_junk_folder;
gint strikeout_col, strikeout_color_col;
@@ -4845,14 +4844,8 @@ message_list_set_folder (MessageList *message_list,
message_list->priv->folder = folder;
message_list->just_set_folder = TRUE;
- store = camel_folder_get_parent_store (folder);
-
- non_trash_folder =
- ((camel_store_get_flags (store) & CAMEL_STORE_VTRASH) == 0) ||
- ((camel_folder_get_flags (folder) & CAMEL_FOLDER_IS_TRASH) == 0);
- non_junk_folder =
- ((camel_store_get_flags (store) & CAMEL_STORE_VJUNK) == 0) ||
- ((camel_folder_get_flags (folder) & CAMEL_FOLDER_IS_JUNK) == 0);
+ non_trash_folder = !(camel_folder_get_flags (folder) & CAMEL_FOLDER_IS_TRASH);
+ non_junk_folder = !(camel_folder_get_flags (folder) & CAMEL_FOLDER_IS_JUNK);
strikeout_col = -1;
strikeout_color_col = -1;
diff --git a/src/modules/mail/e-mail-shell-view-private.c b/src/modules/mail/e-mail-shell-view-private.c
index d39dff0..b2109f9 100644
--- a/src/modules/mail/e-mail-shell-view-private.c
+++ b/src/modules/mail/e-mail-shell-view-private.c
@@ -933,6 +933,12 @@ e_mail_shell_view_update_sidebar (EMailShellView *mail_shell_view)
/* "Trash" folder (virtual or real) */
if (camel_folder_get_flags (folder) & CAMEL_FOLDER_IS_TRASH) {
+ if (num_unread > 0 && selected_count <= 1) {
+ g_string_append_printf (
+ buffer, ngettext ("%d unread, ",
+ "%d unread, ", num_unread), num_unread);
+ }
+
if (CAMEL_IS_VTRASH_FOLDER (folder)) {
/* For a virtual Trash folder, count
* the messages marked for deletion. */
@@ -957,9 +963,14 @@ e_mail_shell_view_update_sidebar (EMailShellView *mail_shell_view)
buffer, ngettext ("%d deleted",
"%d deleted", num_visible), num_visible);
}
-
/* "Junk" folder (virtual or real) */
} else if (camel_folder_get_flags (folder) & CAMEL_FOLDER_IS_JUNK) {
+ if (num_unread > 0 && selected_count <= 1) {
+ g_string_append_printf (
+ buffer, ngettext ("%d unread, ",
+ "%d unread, ", num_unread), num_unread);
+ }
+
if (e_mail_reader_get_hide_deleted (reader)) {
/* Junk folder with deleted messages hidden. */
g_string_append_printf (
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]