More sharing fixes

This commit is contained in:
Ilya Laktyushin 2021-02-19 21:39:49 +04:00
parent 718d4779e4
commit b92b4fb182

View File

@ -374,7 +374,10 @@ public func sentShareItems(account: Account, to peerIds: [PeerId], items: [Prepa
} else if let media = media.media as? TelegramMediaFile {
if media.isVideo {
mediaTypes.video += 1
} else if let fileName = media.fileName, fileName.hasPrefix("mp3") || fileName.hasPrefix("m4a") {
} else if media.isVoice || media.isAnimated || media.isSticker {
mediaTypes = (0, 0, 0, 0)
break
} else if let fileName = media.fileName?.lowercased(), fileName.hasPrefix(".mp3") || fileName.hasPrefix("m4a") {
mediaTypes.music += 1
} else {
mediaTypes.other += 1