UI improvements

This commit is contained in:
Ali
2020-06-05 17:15:40 +04:00
parent a5f9d41dbe
commit 4cbf51364e
30 changed files with 4926 additions and 4563 deletions

View File

@@ -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))
}
}
}
}))