Camera and editor improvements

This commit is contained in:
Ilya Laktyushin
2023-06-14 16:42:55 +04:00
parent e3222ca460
commit b6420c4405
19 changed files with 997 additions and 247 deletions

View File

@@ -286,6 +286,10 @@ final class MediaPickerGridItemNode: GridItemNode {
if self.backgroundNode.supernode == nil {
self.insertSubnode(self.backgroundNode, at: 0)
}
} else {
if self.draftNode.supernode != nil {
self.draftNode.removeFromSupernode()
}
}
if self.currentMediaState == nil || self.currentMediaState!.0.uniqueIdentifier != media.identifier || self.currentMediaState!.1 != index {
@@ -315,6 +319,10 @@ final class MediaPickerGridItemNode: GridItemNode {
if self.backgroundNode.supernode == nil {
self.insertSubnode(self.backgroundNode, at: 0)
}
} else {
if self.draftNode.supernode != nil {
self.draftNode.removeFromSupernode()
}
}
if self.currentState == nil || self.currentState!.0 !== fetchResult || self.currentState!.1 != index {