mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Grouped music files
This commit is contained in:
@@ -10,6 +10,7 @@ import LocalizedPeerData
|
||||
private enum MessageGroupType {
|
||||
case photos
|
||||
case videos
|
||||
case music
|
||||
case generic
|
||||
}
|
||||
|
||||
@@ -18,6 +19,9 @@ private func singleMessageType(message: Message) -> MessageGroupType {
|
||||
if let _ = media as? TelegramMediaImage {
|
||||
return .photos
|
||||
} else if let file = media as? TelegramMediaFile {
|
||||
if file.isMusic {
|
||||
return .music
|
||||
}
|
||||
if file.isVideo && !file.isInstantVideo {
|
||||
return .videos
|
||||
}
|
||||
@@ -80,6 +84,13 @@ public func chatListItemStrings(strings: PresentationStrings, nameDisplayOrder:
|
||||
messageText = strings.ChatList_MessageVideos(Int32(messages.count))
|
||||
textIsReady = true
|
||||
}
|
||||
case .music:
|
||||
if !messageText.isEmpty {
|
||||
textIsReady = true
|
||||
} else {
|
||||
messageText = strings.ChatList_MessageMusic(Int32(messages.count))
|
||||
textIsReady = true
|
||||
}
|
||||
case .generic:
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user