Fix choosing sticker activity layout in chat list

This commit is contained in:
Ilya Laktyushin
2021-08-26 03:00:54 +03:00
parent 60051a7d6a
commit 8bc5041653
2 changed files with 24 additions and 9 deletions

View File

@@ -1131,6 +1131,7 @@ public final class ChatHistoryListNode: ListView, ChatHistoryNode {
return view.values[PreferencesKeys.appConfiguration] as? AppConfiguration ?? .defaultValue
}
var didSetPresentationData = false
self.presentationDataDisposable = (
combineLatest(queue: .mainQueue(),
updatedPresentationData.signal,
@@ -1144,7 +1145,9 @@ public final class ChatHistoryListNode: ListView, ChatHistoryNode {
let animatedEmojiConfig = ChatHistoryAnimatedEmojiConfiguration.with(appConfiguration: appConfiguration)
if previousTheme !== presentationData.theme || previousStrings !== presentationData.strings || previousWallpaper != presentationData.chatWallpaper || previousAnimatedEmojiScale != animatedEmojiConfig.scale {
if !didSetPresentationData || previousTheme !== presentationData.theme || previousStrings !== presentationData.strings || previousWallpaper != presentationData.chatWallpaper || previousAnimatedEmojiScale != animatedEmojiConfig.scale {
didSetPresentationData = true
let themeData = ChatPresentationThemeData(theme: presentationData.theme, wallpaper: presentationData.chatWallpaper)
let chatPresentationData = ChatPresentationData(theme: themeData, fontSize: presentationData.chatFontSize, strings: presentationData.strings, dateTimeFormat: presentationData.dateTimeFormat, nameDisplayOrder: presentationData.nameDisplayOrder, disableAnimations: true, largeEmoji: presentationData.largeEmoji, chatBubbleCorners: presentationData.chatBubbleCorners, animatedEmojiScale: animatedEmojiConfig.scale)