Serialize sticker pack addition

This commit is contained in:
Ali
2020-04-15 00:52:22 +04:00
parent 7f17b1b22d
commit f0c1f3ff3e
9 changed files with 376 additions and 262 deletions

View File

@@ -801,7 +801,7 @@ public func installedStickerPacksController(context: AccountContext, mode: Insta
}
let restPacks = infos.filter { !processedPacks.contains($0.0) }
let sortedPacks = restPacks + tempSortedPacks
addSynchronizeInstalledStickerPacksOperation(transaction: transaction, namespace: namespaceForMode(mode), content: .sync)
addSynchronizeInstalledStickerPacksOperation(transaction: transaction, namespace: namespaceForMode(mode), content: .sync, noDelay: false)
transaction.replaceItemCollectionInfos(namespace: namespaceForMode(mode), itemCollectionInfos: sortedPacks)
}
|> deliverOnMainQueue).start(completed: {