mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-29 03:21:29 +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 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?
|
||||
|
||||
var hideAuthor = false
|
||||
@ -121,9 +121,9 @@ public func chatListItemStrings(strings: PresentationStrings, nameDisplayOrder:
|
||||
case let invoice as TelegramMediaInvoice:
|
||||
messageText = invoice.title
|
||||
case let action as TelegramMediaAction:
|
||||
hideAuthor = true
|
||||
switch action.action {
|
||||
case let .phoneCall(_, discardReason, _):
|
||||
hideAuthor = !isPeerGroup
|
||||
let incoming = message.flags.contains(.Incoming)
|
||||
if let discardReason = discardReason {
|
||||
switch discardReason {
|
||||
@ -144,6 +144,7 @@ public func chatListItemStrings(strings: PresentationStrings, nameDisplayOrder:
|
||||
}
|
||||
}
|
||||
default:
|
||||
hideAuthor = true
|
||||
if let text = plainServiceMessageString(strings: strings, nameDisplayOrder: nameDisplayOrder, message: message, accountPeerId: accountPeerId) {
|
||||
messageText = text
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user