[geary: 2/8] conversation-list: fix comments
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary: 2/8] conversation-list: fix comments
- Date: Sun, 28 Apr 2019 00:53:43 +0000 (UTC)
commit c7824fd0fb3ca26a3b12842c8b58675dbb634dd2
Author: Konstantin Kharlamov <Hi-Angel yandex ru>
Date: Mon Apr 8 01:25:43 2019 +0300
conversation-list: fix comments
The first comment now mentions that entries are unique. This can be
exploited in further commits.
Second comment is misleading: the "if not present, add" part is clear
from code below, and the "in chronological order" is the misleading one:
chronological order is ensured by the first foreach, not by the second
foreach where the comment placed. And the first foreach already has a
commentary about the order.
Signed-off-by: Konstantin Kharlamov <Hi-Angel yandex ru>
src/client/conversation-list/formatted-conversation-data.vala | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/client/conversation-list/formatted-conversation-data.vala
b/src/client/conversation-list/formatted-conversation-data.vala
index 484783fc..7e4ec320 100644
--- a/src/client/conversation-list/formatted-conversation-data.vala
+++ b/src/client/conversation-list/formatted-conversation-data.vala
@@ -186,8 +186,8 @@ public class FormattedConversationData : Geary.BaseObject {
if (conversation == null || account_owner_emails == null || account_owner_emails.size == 0)
return "";
- // Build chronological list of AuthorDisplay records, setting to unread if any message by
- // that author is unread
+ // Build chronological list of unique AuthorDisplay records, setting to
+ // unread if any message by that author is unread
Gee.ArrayList<ParticipantDisplay> list = new Gee.ArrayList<ParticipantDisplay>();
foreach (Geary.Email message in
conversation.get_emails(Geary.App.Conversation.Ordering.RECV_DATE_ASCENDING)) {
// only display if something to display
@@ -199,7 +199,6 @@ public class FormattedConversationData : Geary.BaseObject {
ParticipantDisplay participant_display = new ParticipantDisplay(address,
message.email_flags.is_unread());
- // if not present, add in chronological order
int existing_index = list.index_of(participant_display);
if (existing_index < 0) {
list.add(participant_display);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]