mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-29 19:35:08 +00:00
Fix archive text when last message is a voice call
This commit is contained in:
parent
357e11d1e4
commit
ad8596028d
@ -4,7 +4,7 @@ import TelegramCore
|
|||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
import TelegramUIPreferences
|
import TelegramUIPreferences
|
||||||
|
|
||||||
public func chatListItemStrings(strings: PresentationStrings, nameDisplayOrder: PresentationPersonNameOrder, message: Message?, chatPeer: RenderedPeer, accountPeerId: PeerId, enableMediaEmoji: Bool = true) -> (peer: Peer?, hideAuthor: Bool, messageText: String) {
|
public func chatListItemStrings(strings: PresentationStrings, nameDisplayOrder: PresentationPersonNameOrder, message: Message?, chatPeer: RenderedPeer, accountPeerId: PeerId, enableMediaEmoji: Bool = true, isPeerGroup: Bool = false) -> (peer: Peer?, hideAuthor: Bool, messageText: String) {
|
||||||
let peer: Peer?
|
let peer: Peer?
|
||||||
|
|
||||||
var hideAuthor = false
|
var hideAuthor = false
|
||||||
@ -121,9 +121,9 @@ public func chatListItemStrings(strings: PresentationStrings, nameDisplayOrder:
|
|||||||
case let invoice as TelegramMediaInvoice:
|
case let invoice as TelegramMediaInvoice:
|
||||||
messageText = invoice.title
|
messageText = invoice.title
|
||||||
case let action as TelegramMediaAction:
|
case let action as TelegramMediaAction:
|
||||||
hideAuthor = true
|
|
||||||
switch action.action {
|
switch action.action {
|
||||||
case let .phoneCall(_, discardReason, _):
|
case let .phoneCall(_, discardReason, _):
|
||||||
|
hideAuthor = !isPeerGroup
|
||||||
let incoming = message.flags.contains(.Incoming)
|
let incoming = message.flags.contains(.Incoming)
|
||||||
if let discardReason = discardReason {
|
if let discardReason = discardReason {
|
||||||
switch discardReason {
|
switch discardReason {
|
||||||
@ -144,6 +144,7 @@ public func chatListItemStrings(strings: PresentationStrings, nameDisplayOrder:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
hideAuthor = true
|
||||||
if let text = plainServiceMessageString(strings: strings, nameDisplayOrder: nameDisplayOrder, message: message, accountPeerId: accountPeerId) {
|
if let text = plainServiceMessageString(strings: strings, nameDisplayOrder: nameDisplayOrder, message: message, accountPeerId: accountPeerId) {
|
||||||
messageText = text
|
messageText = text
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user