mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Various improvements
This commit is contained in:
@@ -248,6 +248,24 @@ final class ChatMessageNotificationItemNode: NotificationItemNode {
|
||||
title = nil
|
||||
messageText = rawText
|
||||
}
|
||||
case .video:
|
||||
let rawText = presentationData.strings.PUSH_CHANNEL_MESSAGE_VIDEOS(Int32(item.messages.count), peer.displayTitle(strings: item.strings, displayOrder: item.nameDisplayOrder), Int32(item.messages.count))
|
||||
if let index = rawText.firstIndex(of: "|") {
|
||||
title = String(rawText[rawText.startIndex ..< index])
|
||||
messageText = String(rawText[rawText.index(after: index)...])
|
||||
} else {
|
||||
title = nil
|
||||
messageText = rawText
|
||||
}
|
||||
case .file:
|
||||
let rawText = presentationData.strings.PUSH_CHANNEL_MESSAGE_DOCS(Int32(item.messages.count), peer.displayTitle(strings: item.strings, displayOrder: item.nameDisplayOrder), Int32(item.messages.count))
|
||||
if let index = rawText.firstIndex(of: "|") {
|
||||
title = String(rawText[rawText.startIndex ..< index])
|
||||
messageText = String(rawText[rawText.index(after: index)...])
|
||||
} else {
|
||||
title = nil
|
||||
messageText = rawText
|
||||
}
|
||||
default:
|
||||
let rawText = presentationData.strings.PUSH_CHANNEL_MESSAGES(Int32(item.messages.count), peer.displayTitle(strings: item.strings, displayOrder: item.nameDisplayOrder), Int32(item.messages.count))
|
||||
if let index = rawText.firstIndex(of: "|") {
|
||||
@@ -272,6 +290,24 @@ final class ChatMessageNotificationItemNode: NotificationItemNode {
|
||||
title = nil
|
||||
messageText = rawText
|
||||
}
|
||||
case .video:
|
||||
let rawText = presentationData.strings.PUSH_CHAT_MESSAGE_VIDEOS(Int32(item.messages.count), author.compactDisplayTitle, peer.displayTitle(strings: item.strings, displayOrder: item.nameDisplayOrder), Int32(item.messages.count))
|
||||
if let index = rawText.firstIndex(of: "|") {
|
||||
title = String(rawText[rawText.startIndex ..< index])
|
||||
messageText = String(rawText[rawText.index(after: index)...])
|
||||
} else {
|
||||
title = nil
|
||||
messageText = rawText
|
||||
}
|
||||
case .file:
|
||||
let rawText = presentationData.strings.PUSH_CHAT_MESSAGE_DOCS(Int32(item.messages.count), author.compactDisplayTitle, peer.displayTitle(strings: item.strings, displayOrder: item.nameDisplayOrder), Int32(item.messages.count))
|
||||
if let index = rawText.firstIndex(of: "|") {
|
||||
title = String(rawText[rawText.startIndex ..< index])
|
||||
messageText = String(rawText[rawText.index(after: index)...])
|
||||
} else {
|
||||
title = nil
|
||||
messageText = rawText
|
||||
}
|
||||
default:
|
||||
let rawText = presentationData.strings.PUSH_CHAT_MESSAGES(Int32(item.messages.count), author.compactDisplayTitle, peer.displayTitle(strings: item.strings, displayOrder: item.nameDisplayOrder), Int32(item.messages.count))
|
||||
if let index = rawText.firstIndex(of: "|") {
|
||||
@@ -293,6 +329,24 @@ final class ChatMessageNotificationItemNode: NotificationItemNode {
|
||||
title = nil
|
||||
messageText = rawText
|
||||
}
|
||||
case .video:
|
||||
let rawText = presentationData.strings.PUSH_MESSAGE_VIDEOS(Int32(item.messages.count), peer.displayTitle(strings: item.strings, displayOrder: item.nameDisplayOrder), Int32(item.messages.count))
|
||||
if let index = rawText.firstIndex(of: "|") {
|
||||
title = String(rawText[rawText.startIndex ..< index])
|
||||
messageText = String(rawText[rawText.index(after: index)...])
|
||||
} else {
|
||||
title = nil
|
||||
messageText = rawText
|
||||
}
|
||||
case .file:
|
||||
let rawText = presentationData.strings.PUSH_MESSAGE_DOCS(Int32(item.messages.count), peer.displayTitle(strings: item.strings, displayOrder: item.nameDisplayOrder), Int32(item.messages.count))
|
||||
if let index = rawText.firstIndex(of: "|") {
|
||||
title = String(rawText[rawText.startIndex ..< index])
|
||||
messageText = String(rawText[rawText.index(after: index)...])
|
||||
} else {
|
||||
title = nil
|
||||
messageText = rawText
|
||||
}
|
||||
default:
|
||||
let rawText = presentationData.strings.PUSH_MESSAGES(Int32(item.messages.count), peer.displayTitle(strings: item.strings, displayOrder: item.nameDisplayOrder), Int32(item.messages.count))
|
||||
if let index = rawText.firstIndex(of: "|") {
|
||||
|
||||
Reference in New Issue
Block a user