mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 09:26:29 +03:00
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
This commit is contained in:
@@ -396,8 +396,6 @@ impl Chatlist {
|
|||||||
if lastmsg.from_id == ContactId::SELF {
|
if lastmsg.from_id == ContactId::SELF {
|
||||||
None
|
None
|
||||||
} else if chat.typ == Chattype::Group
|
} else if chat.typ == Chattype::Group
|
||||||
|| chat.typ == Chattype::OutBroadcast
|
|
||||||
|| chat.typ == Chattype::InBroadcast
|
|
||||||
|| chat.typ == Chattype::Mailinglist
|
|| chat.typ == Chattype::Mailinglist
|
||||||
|| chat.is_self_talk()
|
|| chat.is_self_talk()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -850,11 +850,10 @@ impl Message {
|
|||||||
|
|
||||||
let contact = if self.from_id != ContactId::SELF {
|
let contact = if self.from_id != ContactId::SELF {
|
||||||
match chat.typ {
|
match chat.typ {
|
||||||
Chattype::Group
|
Chattype::Group | Chattype::Mailinglist => {
|
||||||
| Chattype::OutBroadcast
|
Some(Contact::get_by_id(context, self.from_id).await?)
|
||||||
| Chattype::InBroadcast
|
}
|
||||||
| Chattype::Mailinglist => Some(Contact::get_by_id(context, self.from_id).await?),
|
Chattype::Single | Chattype::OutBroadcast | Chattype::InBroadcast => None,
|
||||||
Chattype::Single => None,
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
|
|||||||
@@ -98,14 +98,13 @@ impl Summary {
|
|||||||
let prefix = if msg.state == MessageState::OutDraft {
|
let prefix = if msg.state == MessageState::OutDraft {
|
||||||
Some(SummaryPrefix::Draft(stock_str::draft(context).await))
|
Some(SummaryPrefix::Draft(stock_str::draft(context).await))
|
||||||
} else if msg.from_id == ContactId::SELF {
|
} 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
|
None
|
||||||
} else {
|
} else {
|
||||||
Some(SummaryPrefix::Me(stock_str::self_msg(context).await))
|
Some(SummaryPrefix::Me(stock_str::self_msg(context).await))
|
||||||
}
|
}
|
||||||
} else if chat.typ == Chattype::Group
|
} else if chat.typ == Chattype::Group
|
||||||
|| chat.typ == Chattype::OutBroadcast
|
|
||||||
|| chat.typ == Chattype::InBroadcast
|
|
||||||
|| chat.typ == Chattype::Mailinglist
|
|| chat.typ == Chattype::Mailinglist
|
||||||
|| chat.is_self_talk()
|
|| chat.is_self_talk()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user