[WIP] Animated emoji

This commit is contained in:
Ali
2022-07-08 19:53:20 +02:00
parent 1ac654e8b2
commit ed59ead31e
108 changed files with 1005 additions and 678 deletions

View File

@@ -529,6 +529,11 @@ public final class Transaction {
return self.postbox?.updateMedia(id, update: update) ?? Set()
}
public func storeMediaIfNotPresent(media: Media) {
assert(!self.disposed)
self.postbox?.storeMediaIfNotPresent(media: media)
}
public func replaceItemCollections(namespace: ItemCollectionId.Namespace, itemCollections: [(ItemCollectionId, ItemCollectionInfo, [ItemCollectionItem])]) {
assert(!self.disposed)
self.postbox?.replaceItemCollections(namespace: namespace, itemCollections: itemCollections)
@@ -2295,6 +2300,10 @@ final class PostboxImpl {
return updatedMessageIndices
}
fileprivate func storeMediaIfNotPresent(media: Media) {
self.messageHistoryTable.storeMediaIfNotPresent(media: media)
}
fileprivate func replaceItemCollections(namespace: ItemCollectionId.Namespace, itemCollections: [(ItemCollectionId, ItemCollectionInfo, [ItemCollectionItem])]) {
var infos: [(ItemCollectionId, ItemCollectionInfo)] = []
for (id, info, items) in itemCollections {