From 55ab1b86f7c73324e7dacb51f60189c86a363e9b Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Wed, 7 Jan 2026 15:33:35 +0100 Subject: [PATCH] feat: more text instead of sender in channel summary the sender is usually always the same and is not needed already in the summary; making more place for the message instead --- src/chatlist.rs | 2 -- src/message.rs | 9 ++++----- src/summary.rs | 5 ++--- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/chatlist.rs b/src/chatlist.rs index 67ddb9da3..ef2778bba 100644 --- a/src/chatlist.rs +++ b/src/chatlist.rs @@ -396,8 +396,6 @@ impl Chatlist { if lastmsg.from_id == ContactId::SELF { None } else if chat.typ == Chattype::Group - || chat.typ == Chattype::OutBroadcast - || chat.typ == Chattype::InBroadcast || chat.typ == Chattype::Mailinglist || chat.is_self_talk() { diff --git a/src/message.rs b/src/message.rs index f02aa2619..249b96fef 100644 --- a/src/message.rs +++ b/src/message.rs @@ -850,11 +850,10 @@ impl Message { let contact = if self.from_id != ContactId::SELF { match chat.typ { - Chattype::Group - | Chattype::OutBroadcast - | Chattype::InBroadcast - | Chattype::Mailinglist => Some(Contact::get_by_id(context, self.from_id).await?), - Chattype::Single => None, + Chattype::Group | Chattype::Mailinglist => { + Some(Contact::get_by_id(context, self.from_id).await?) + } + Chattype::Single | Chattype::OutBroadcast | Chattype::InBroadcast => None, } } else { None diff --git a/src/summary.rs b/src/summary.rs index 90ddd1e35..109d13760 100644 --- a/src/summary.rs +++ b/src/summary.rs @@ -98,14 +98,13 @@ impl Summary { let prefix = if msg.state == MessageState::OutDraft { Some(SummaryPrefix::Draft(stock_str::draft(context).await)) } else if msg.from_id == ContactId::SELF { - if msg.is_info() || msg.viewtype == Viewtype::Call { + if msg.is_info() || msg.viewtype == Viewtype::Call || chat.typ == Chattype::OutBroadcast + { None } else { Some(SummaryPrefix::Me(stock_str::self_msg(context).await)) } } else if chat.typ == Chattype::Group - || chat.typ == Chattype::OutBroadcast - || chat.typ == Chattype::InBroadcast || chat.typ == Chattype::Mailinglist || chat.is_self_talk() {