mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix blurred components appearance
This commit is contained in:
parent
8380e87571
commit
ef49e3de9c
@ -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)
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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,20 +523,22 @@ 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)
|
||||
} else {
|
||||
writeAbilityTestSuccess = false
|
||||
}
|
||||
|
||||
if !success {
|
||||
let alertController = UIAlertController(title: nil, message: "There is not enough free space on the device.", preferredStyle: .alert)
|
||||
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()
|
||||
}))
|
||||
@ -543,9 +546,6 @@ private func extractAccountManagerState(records: AccountRecordsView<TelegramAcco
|
||||
|
||||
return true
|
||||
}
|
||||
} else {
|
||||
preconditionFailure()
|
||||
}
|
||||
|
||||
let legacyLogs: [String] = [
|
||||
"broadcast-logs",
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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()
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user