[geary: 3/8] conversation-list: remove unnecessary comparison



commit 773f83d62f02c1f3d1c9916ebcfb2a6f452aef06
Author: Konstantin Kharlamov <Hi-Angel yandex ru>
Date:   Mon Apr 8 01:30:56 2019 +0300

    conversation-list: remove unnecessary comparison
    
    Fetching the value and comparing it to 0 should work just as fast as
    directly assigning it. And since we don't really need to know here what
    was the value of is_unread before, remove the comparison.
    
    Signed-off-by: Konstantin Kharlamov <Hi-Angel yandex ru>

 src/client/conversation-list/formatted-conversation-data.vala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/client/conversation-list/formatted-conversation-data.vala 
b/src/client/conversation-list/formatted-conversation-data.vala
index 7e4ec320..562e0823 100644
--- a/src/client/conversation-list/formatted-conversation-data.vala
+++ b/src/client/conversation-list/formatted-conversation-data.vala
@@ -208,7 +208,7 @@ public class FormattedConversationData : Geary.BaseObject {
 
                 // if present and this message is unread but the prior were read,
                 // this author is now unread
-                if (message.email_flags.is_unread() && !list[existing_index].is_unread)
+                if (message.email_flags.is_unread())
                     list[existing_index].is_unread = true;
             }
         }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]