mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-15 21:45:19 +00:00
Merge commit 'b0c6118d869b6622ebf8446688cc9298e358f782'
This commit is contained in:
commit
921b160b69
@ -131,6 +131,7 @@ private func synchronizeEmojiKeywords(postbox: Postbox, transaction: Transaction
|
|||||||
for apiEmojiKeyword in keywords {
|
for apiEmojiKeyword in keywords {
|
||||||
switch apiEmojiKeyword {
|
switch apiEmojiKeyword {
|
||||||
case let .emojiKeyword(keyword, emoticons):
|
case let .emojiKeyword(keyword, emoticons):
|
||||||
|
let keyword = keyword.replacingOccurrences(of: " ", with: "")
|
||||||
let indexKeys = stringIndexTokens(keyword, transliteration: .none).map { $0.toMemoryBuffer() }
|
let indexKeys = stringIndexTokens(keyword, transliteration: .none).map { $0.toMemoryBuffer() }
|
||||||
let item = EmojiKeywordItem(index: ItemCollectionItemIndex(index: 0, id: 0), collectionId: collectionId.id, keyword: keyword, emoticons: emoticons, indexKeys: indexKeys)
|
let item = EmojiKeywordItem(index: ItemCollectionItemIndex(index: 0, id: 0), collectionId: collectionId.id, keyword: keyword, emoticons: emoticons, indexKeys: indexKeys)
|
||||||
itemsToAppend[keyword] = item
|
itemsToAppend[keyword] = item
|
||||||
@ -200,6 +201,7 @@ private func synchronizeEmojiKeywords(postbox: Postbox, transaction: Transaction
|
|||||||
var index: Int32 = 0
|
var index: Int32 = 0
|
||||||
for apiEmojiKeyword in keywords {
|
for apiEmojiKeyword in keywords {
|
||||||
if case let .emojiKeyword(keyword, emoticons) = apiEmojiKeyword, !emoticons.isEmpty {
|
if case let .emojiKeyword(keyword, emoticons) = apiEmojiKeyword, !emoticons.isEmpty {
|
||||||
|
let keyword = keyword.replacingOccurrences(of: " ", with: "")
|
||||||
let indexKeys = stringIndexTokens(keyword, transliteration: .none).map { $0.toMemoryBuffer() }
|
let indexKeys = stringIndexTokens(keyword, transliteration: .none).map { $0.toMemoryBuffer() }
|
||||||
let item = EmojiKeywordItem(index: ItemCollectionItemIndex(index: index, id: keywordCollectionItemId(keyword, inputLanguageCode: operation.inputLanguageCode)), collectionId: collectionId.id, keyword: keyword, emoticons: emoticons, indexKeys: indexKeys)
|
let item = EmojiKeywordItem(index: ItemCollectionItemIndex(index: index, id: keywordCollectionItemId(keyword, inputLanguageCode: operation.inputLanguageCode)), collectionId: collectionId.id, keyword: keyword, emoticons: emoticons, indexKeys: indexKeys)
|
||||||
items.append(item)
|
items.append(item)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user