From a257b163376174e4f5efcbc82c9fdd56463c3191 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Wed, 30 Aug 2017 00:03:37 +0200 Subject: Download & inline display images --- main/src/ui/conversation_summary/conversation_item_skeleton.vala | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'main/src/ui/conversation_summary/conversation_item_skeleton.vala') diff --git a/main/src/ui/conversation_summary/conversation_item_skeleton.vala b/main/src/ui/conversation_summary/conversation_item_skeleton.vala index f9340c84..1eb76840 100644 --- a/main/src/ui/conversation_summary/conversation_item_skeleton.vala +++ b/main/src/ui/conversation_summary/conversation_item_skeleton.vala @@ -84,6 +84,7 @@ public class ConversationItemSkeleton : Grid { private void update_received() { bool all_received = true; bool all_read = true; + bool all_sent = true; foreach (Plugins.MetaConversationItem item in items) { if (item.mark == Message.Marked.WONTSEND) { received_image.visible = true; @@ -96,6 +97,9 @@ public class ConversationItemSkeleton : Grid { all_read = false; if (item.mark != Message.Marked.RECEIVED) { all_received = false; + if (item.mark == Message.Marked.UNSENT) { + all_sent = false; + } } } } @@ -105,6 +109,9 @@ public class ConversationItemSkeleton : Grid { } else if (all_received) { received_image.visible = true; received_image.set_from_icon_name("dino-tick-symbolic", IconSize.SMALL_TOOLBAR); + } else if (!all_sent) { + received_image.visible = true; + received_image.set_from_icon_name("image-loading-symbolic", IconSize.SMALL_TOOLBAR); } else if (received_image.visible) { received_image.set_from_icon_name("image-loading-symbolic", IconSize.SMALL_TOOLBAR); } @@ -130,7 +137,7 @@ public class ConversationItemSkeleton : Grid { return format_time(datetime, /* xgettext:no-c-format */ /* Month, day and time in 24h format (w/o seconds) */ _("%b %d, %H∶%M"), /* xgettext:no-c-format */ /* Month, day and time in 12h format (w/o seconds) */ _("%b %d, %l∶%M %p")); - } else if (datetime.get_day_of_month() != new DateTime.now_utc().get_day_of_month()) { + } else if (datetime.get_day_of_month() != now.get_day_of_month()) { return format_time(datetime, /* xgettext:no-c-format */ /* Day of week and time in 24h format (w/o seconds) */ _("%a, %H∶%M"), /* xgettext:no-c-format */ /* Day of week and time in 12h format (w/o seconds) */_("%a, %l∶%M %p")); -- cgit v1.2.3-54-g00ecf