mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
[WIP] General UI improvements
This commit is contained in:
@@ -3604,7 +3604,7 @@ func replayFinalState(
|
||||
let namespace: ItemCollectionId.Namespace
|
||||
var items: [ItemCollectionItem] = []
|
||||
let info: StickerPackCollectionInfo
|
||||
if case let .stickerSet(set, packs, documents) = apiSet {
|
||||
if case let .stickerSet(set, packs, keywords, documents) = apiSet {
|
||||
var indexKeysByFile: [MediaId: [MemoryBuffer]] = [:]
|
||||
for pack in packs {
|
||||
switch pack {
|
||||
@@ -3621,6 +3621,20 @@ func replayFinalState(
|
||||
break
|
||||
}
|
||||
}
|
||||
for keyword in keywords {
|
||||
switch keyword {
|
||||
case let .stickerKeyword(documentId, texts):
|
||||
for text in texts {
|
||||
let key = ValueBoxKey(text).toMemoryBuffer()
|
||||
let mediaId = MediaId(namespace: Namespaces.Media.CloudFile, id: documentId)
|
||||
if indexKeysByFile[mediaId] == nil {
|
||||
indexKeysByFile[mediaId] = [key]
|
||||
} else {
|
||||
indexKeysByFile[mediaId]!.append(key)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for apiDocument in documents {
|
||||
if let file = telegramMediaFileFromApiDocument(apiDocument), let id = file.id {
|
||||
|
||||
Reference in New Issue
Block a user