[geary/wip/794700-lazy-load-conversations: 13/19] Don't auto-mark email as read when window is not in the foreground
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/794700-lazy-load-conversations: 13/19] Don't auto-mark email as read when window is not in the foreground
- Date: Mon, 21 Jan 2019 00:42:38 +0000 (UTC)
commit 436fac7f2b9524b209ad90a7acbc2b803ebd9f67
Author: Michael Gratton <mike vee net>
Date: Sun Jan 20 11:44:37 2019 +1030
Don't auto-mark email as read when window is not in the foreground
src/client/conversation-viewer/conversation-list-box.vala | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/client/conversation-viewer/conversation-list-box.vala
b/src/client/conversation-viewer/conversation-list-box.vala
index 519e51a4..b7f19425 100644
--- a/src/client/conversation-viewer/conversation-list-box.vala
+++ b/src/client/conversation-viewer/conversation-list-box.vala
@@ -870,7 +870,7 @@ public class ConversationListBox : Gtk.ListBox, Geary.BaseInterface {
// size of the body will be off, affecting the visibility
// of emails further down the conversation.
if (email_view.email.is_unread().is_certain() &&
- conversation_message.web_view.has_valid_height &&
+ email_view.message_bodies_loaded &&
!email_view.is_manually_read) {
int body_top = 0;
int body_left = 0;
@@ -899,7 +899,11 @@ public class ConversationListBox : Gtk.ListBox, Geary.BaseInterface {
return true;
});
- if (email_ids.size > 0) {
+ // Only-automark if the window is currently focused
+ Gtk.Window? top_level = get_toplevel() as Gtk.Window;
+ if (top_level != null &&
+ top_level.is_active &&
+ email_ids.size > 0) {
Geary.EmailFlags flags = new Geary.EmailFlags();
flags.add(Geary.EmailFlags.UNREAD);
mark_emails(email_ids, null, flags);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]