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()

View File

@@ -940,6 +940,8 @@ final class ChatMessageInteractiveFileNode: ASDisplayNode {
self.streamingStatusNode = streamingStatusNode
streamingStatusNode.frame = streamingCacheStatusFrame
self.addSubnode(streamingStatusNode)
} else if let streamingStatusNode = self.streamingStatusNode {
streamingStatusNode.backgroundNodeColor = backgroundNodeColor
}
if let statusNode = self.statusNode {

View File

@@ -306,6 +306,8 @@ func openChatTheme(context: AccountContext, message: Message, pushController: @e
} else {
displayUnsupportedAlert()
}
} else {
displayUnsupportedAlert()
}
} else {
displayUnsupportedAlert()