Various fixes

This commit is contained in:
Ilya Laktyushin
2020-10-30 21:35:36 +04:00
parent 33d946f8db
commit 778f7ed2b2
3 changed files with 5 additions and 1 deletions

View File

@@ -1285,7 +1285,7 @@ class ChatMessageAnimatedStickerItemNode: ChatMessageItemView {
}
let emojiSounds = AnimatedEmojiSoundsConfiguration.with(appConfiguration: appConfiguration, account: item.context.account)
for (emoji, file) in emojiSounds.sounds {
if emoji.unicodeScalars.first == firstScalar {
if emoji.strippedEmoji == text.strippedEmoji {
let mediaManager = item.context.sharedContext.mediaManager
let mediaPlayer = MediaPlayer(audioSessionManager: mediaManager.audioSession, postbox: item.context.account.postbox, resourceReference: .standalone(resource: file.resource), streamable: .none, video: false, preferSoftwareDecoding: false, enableSound: true, fetchAutomatically: true, ambient: true)
mediaPlayer.togglePlayPause()