mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
UI improvements
This commit is contained in:
@@ -127,6 +127,12 @@ public class ImageNode: ASDisplayNode {
|
||||
private var first = true
|
||||
private let enableEmpty: Bool
|
||||
|
||||
private let _contentReady = Promise<Bool>()
|
||||
private var didSetReady: Bool = false
|
||||
public var contentReady: Signal<Bool, NoError> {
|
||||
return self._contentReady.get()
|
||||
}
|
||||
|
||||
public var ready: Signal<Bool, NoError> {
|
||||
if let hasImage = self.hasImage {
|
||||
return hasImage.get()
|
||||
@@ -171,6 +177,10 @@ public class ImageNode: ASDisplayNode {
|
||||
hasImage.set(true)
|
||||
}
|
||||
}
|
||||
if !strongSelf.didSetReady {
|
||||
strongSelf.didSetReady = true
|
||||
strongSelf._contentReady.set(.single(true))
|
||||
}
|
||||
}
|
||||
}
|
||||
}))
|
||||
|
||||
Reference in New Issue
Block a user