Fix blurred components appearance

This commit is contained in:
Ali 2023-03-13 16:06:07 +04:00
parent 8380e87571
commit ef49e3de9c
6 changed files with 27 additions and 19 deletions

View File

@ -114,7 +114,7 @@ public class StickerShimmerEffectNode: ASDisplayNode {
self.currentSize = size
self.backgroundNode.backgroundColor = foregroundColor
self.backgroundNode.isHidden = !enableEffect
self.backgroundNode.isHidden = true//!enableEffect
if enableEffect {
self.effectNode.update(backgroundColor: backgroundColor == nil ? .clear : foregroundColor, foregroundColor: shimmeringColor, horizontal: true, effectSize: nil, globalTimeOffset: true, duration: nil)

View File

@ -24,7 +24,7 @@ public func selectReactionFillStaticColor(theme: PresentationTheme, wallpaper: T
} else if case .builtin = wallpaper {
return UIColor(rgb: 0x748391, alpha: 0.45)
} else {
return theme.chat.serviceMessage.components.withCustomWallpaper.dateFillStatic
return .clear//theme.chat.serviceMessage.components.withCustomWallpaper.dateFillStatic
}
}

View File

@ -514,6 +514,7 @@ private func extractAccountManagerState(records: AccountRecordsView<TelegramAcco
TempBox.initializeShared(basePath: rootPath, processType: "app", launchSpecificId: Int64.random(in: Int64.min ... Int64.max))
let writeAbilityTestFile = TempBox.shared.tempFile(fileName: "test.bin")
var writeAbilityTestSuccess = true
if let testFile = ManagedFile(queue: nil, path: writeAbilityTestFile.path, mode: .readwrite) {
let bufferSize = 128 * 1024
let randomBuffer = malloc(bufferSize)!
@ -522,29 +523,28 @@ private func extractAccountManagerState(records: AccountRecordsView<TelegramAcco
}
arc4random_buf(randomBuffer, bufferSize)
var writtenBytes = 0
var success = true
while writtenBytes < 1024 * 1024 {
let actualBytes = testFile.write(randomBuffer, count: bufferSize)
writtenBytes += actualBytes
if actualBytes != bufferSize {
success = false
writeAbilityTestSuccess = false
break
}
}
testFile._unsafeClose()
TempBox.shared.dispose(writeAbilityTestFile)
if !success {
let alertController = UIAlertController(title: nil, message: "There is not enough free space on the device.", preferredStyle: .alert)
alertController.addAction(UIAlertAction(title: "OK", style: .default, handler: { _ in
preconditionFailure()
}))
self.mainWindow?.presentNative(alertController)
return true
}
} else {
preconditionFailure()
writeAbilityTestSuccess = false
}
if !writeAbilityTestSuccess {
let alertController = UIAlertController(title: nil, message: "The device does not have sufficient free space.", preferredStyle: .alert)
alertController.addAction(UIAlertAction(title: "OK", style: .default, handler: { _ in
preconditionFailure()
}))
self.mainWindow?.presentNative(alertController)
return true
}
let legacyLogs: [String] = [

View File

@ -477,7 +477,7 @@ final class ChatLoadingPlaceholderNode: ASDisplayNode {
if self.backgroundNode?.hasExtraBubbleBackground() == true {
self.backgroundColorNode.isHidden = true
} else {
self.backgroundColorNode.isHidden = false
self.backgroundColorNode.isHidden = true
}
if let backgroundNode = self.backgroundNode, let backgroundContent = backgroundNode.makeBubbleBackground(for: .free) {

View File

@ -572,7 +572,7 @@ private final class WallpaperBlurNode: ASDisplayNode {
super.init()
self.addSubnode(self.colorNode)
//self.addSubnode(self.colorNode)
}
func update(rect: CGRect, within size: CGSize, color: UIColor, wallpaperNode: WallpaperBackgroundNode?, transition: ContainedViewLayoutTransition) {

View File

@ -27,10 +27,18 @@ class ChatUnreadItem: ListViewItem {
func nodeConfiguredForParams(async: @escaping (@escaping () -> Void) -> Void, params: ListViewItemLayoutParams, synchronousLoads: Bool, previousItem: ListViewItem?, nextItem: ListViewItem?, completion: @escaping (ListViewItemNode, @escaping () -> (Signal<Void, NoError>?, (ListViewItemApply) -> Void)) -> Void) {
async {
let node = ChatUnreadItemNode()
node.layoutForParams(params, item: self, previousItem: previousItem, nextItem: nextItem)
let dateAtBottom = !chatItemsHaveCommonDateHeader(self, nextItem)
let (layout, apply) = node.asyncLayout()(self, params, dateAtBottom)
node.contentSize = layout.contentSize
node.insets = layout.insets
Queue.mainQueue().async {
completion(node, {
return (nil, { _ in })
return (nil, { _ in
apply()
})
})
}
}