Fix gradient background flickering on chat switch when loading

This commit is contained in:
Ilya Laktyushin 2023-04-23 16:17:59 +04:00
parent 9c1c0b58dc
commit 0908a3cf63

View File

@ -1,6 +1,7 @@
import Foundation import Foundation
import UIKit import UIKit
import AsyncDisplayKit import AsyncDisplayKit
import SwiftSignalKit
import Display import Display
import TelegramCore import TelegramCore
import TelegramPresentationData import TelegramPresentationData
@ -207,9 +208,11 @@ final class ChatLoadingPlaceholderNode: ASDisplayNode {
self.borderNode.view.mask = self.borderMaskNode.view self.borderNode.view.mask = self.borderMaskNode.view
if self.context.sharedContext.energyUsageSettings.fullTranslucency { if self.context.sharedContext.energyUsageSettings.fullTranslucency {
Queue.mainQueue().after(0.3) {
self.backgroundNode?.updateIsLooping(true) self.backgroundNode?.updateIsLooping(true)
} }
} }
}
private var bottomInset: (Int, CGFloat)? private var bottomInset: (Int, CGFloat)?
func setup(_ historyNode: ChatHistoryNode, updating: Bool = false) { func setup(_ historyNode: ChatHistoryNode, updating: Bool = false) {