aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/conversation_selector/conversation_selector_row.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2026-08-14 11:45:08 +0200
committerfiaxh <git@lightrise.org>2026-08-21 18:18:03 +0200
commit8d49d83b3b45ab22d7b9d945c4b32296b07cb49e (patch)
tree5a0bf3d777c4efd806388163fc9dc74c87edd07b /main/src/ui/conversation_selector/conversation_selector_row.vala
parent6d0706bcaa6d54354e416174e3d2654a2bff81fe (diff)
Add initial support for multi-file transfers
Diffstat (limited to 'main/src/ui/conversation_selector/conversation_selector_row.vala')
-rw-r--r--main/src/ui/conversation_selector/conversation_selector_row.vala19
1 files changed, 19 insertions, 0 deletions
diff --git a/main/src/ui/conversation_selector/conversation_selector_row.vala b/main/src/ui/conversation_selector/conversation_selector_row.vala
index fd5814fa..0e565c84 100644
--- a/main/src/ui/conversation_selector/conversation_selector_row.vala
+++ b/main/src/ui/conversation_selector/conversation_selector_row.vala
@@ -226,6 +226,25 @@ public class ConversationSelectorRow : ListBoxRow {
message_label.label = (file_is_image ? _("Image received") : _("File received") );
}
break;
+ case FileGroupItem.TYPE:
+ FileGroupItem file_group_item = last_content_item as FileGroupItem;
+ FileTransfer first_transfer = file_group_item.file_group.file_transfers.get(0);
+
+ if (conversation.type_ == Conversation.Type.GROUPCHAT) {
+ // TODO properly display nick for oneself
+ nick_label.label = Util.get_participant_display_name(stream_interactor, conversation, first_transfer.from, true) + ": ";
+ } else {
+ nick_label.label = first_transfer.direction == Message.DIRECTION_SENT ? _("Me") + ": " : "";
+ }
+
+ bool all_files_images = Ui.all_files_images(file_group_item.file_group.file_transfers);
+ change_label_attribute(message_label, attr_style_new(Pango.Style.ITALIC));
+ if (first_transfer.direction == Message.DIRECTION_SENT) {
+ message_label.label = (all_files_images ? _("Images sent") : _("Files sent") );
+ } else {
+ message_label.label = (all_files_images ? _("Images received") : _("Files received") );
+ }
+ break;
case CallItem.TYPE:
CallItem call_item = (CallItem) last_content_item;
Call call = call_item.call;