Emoji status and reaction improvements

This commit is contained in:
Ali
2022-08-26 13:33:32 +03:00
parent e26c4a6bf0
commit c535d51621
50 changed files with 848 additions and 379 deletions

View File

@@ -169,15 +169,7 @@ class ReactionChatPreviewItemNode: ListViewItemNode {
let standaloneReactionAnimation = StandaloneReactionAnimation()
self.standaloneReactionAnimation = standaloneReactionAnimation
let animationCache: AnimationCache
if let current = self.animationCache {
animationCache = current
} else {
animationCache = AnimationCacheImpl(basePath: item.context.account.postbox.mediaBox.basePath + "/animation-cache", allocateTempFile: {
return TempBox.shared.tempFile(fileName: "file").path
})
self.animationCache = animationCache
}
let animationCache = item.context.animationCache
supernode.addSubnode(standaloneReactionAnimation)
standaloneReactionAnimation.frame = supernode.bounds

View File

@@ -63,10 +63,8 @@ private final class TextSizeSelectionControllerNode: ASDisplayNode, UIScrollView
self.presentationData = context.sharedContext.currentPresentationData.with { $0 }
self.presentationThemeSettings = presentationThemeSettings
self.animationCache = AnimationCacheImpl(basePath: context.account.postbox.mediaBox.basePath + "/animation-cache", allocateTempFile: {
return TempBox.shared.tempFile(fileName: "file").path
})
self.animationRenderer = MultiAnimationRendererImpl()
self.animationCache = context.animationCache
self.animationRenderer = context.animationRenderer
let calendar = Calendar(identifier: .gregorian)
var components = calendar.dateComponents(Set([.era, .year, .month, .day, .hour, .minute, .second]), from: Date())

View File

@@ -233,10 +233,8 @@ final class ThemeAccentColorControllerNode: ASDisplayNode, UIScrollViewDelegate
self.wallpaper = self.presentationData.chatWallpaper
let bubbleCorners = self.presentationData.chatBubbleCorners
self.animationCache = AnimationCacheImpl(basePath: context.account.postbox.mediaBox.basePath + "/animation-cache", allocateTempFile: {
return TempBox.shared.tempFile(fileName: "file").path
})
self.animationRenderer = MultiAnimationRendererImpl()
self.animationCache = context.animationCache
self.animationRenderer = context.animationRenderer
self.ready = ready

View File

@@ -88,10 +88,8 @@ final class ThemePreviewControllerNode: ASDisplayNode, UIScrollViewDelegate {
self.presentationData = context.sharedContext.currentPresentationData.with { $0 }
self.animationCache = AnimationCacheImpl(basePath: context.account.postbox.mediaBox.basePath + "/animation-cache", allocateTempFile: {
return TempBox.shared.tempFile(fileName: "file").path
})
self.animationRenderer = MultiAnimationRendererImpl()
self.animationCache = context.animationCache
self.animationRenderer = context.animationRenderer
let calendar = Calendar(identifier: .gregorian)
var components = calendar.dateComponents(Set([.era, .year, .month, .day, .hour, .minute, .second]), from: Date())