Reindex custom tags + tag as needed

This commit is contained in:
Isaac
2024-02-02 19:45:35 +01:00
parent e2d238a2aa
commit 1d8668a7c1
4 changed files with 79 additions and 1 deletions

View File

@@ -1395,5 +1395,11 @@ public extension TelegramEngine {
public func searchLocalSavedMessagesPeers(query: String, indexNameMapping: [EnginePeer.Id: [PeerIndexNameRepresentation]]) -> Signal<[EnginePeer], NoError> {
return _internal_searchLocalSavedMessagesPeers(account: self.account, query: query, indexNameMapping: indexNameMapping)
}
public func internalReindexSavedMessagesCustomTagsIfNeeded(threadId: Int64?, tag: MemoryBuffer) {
let _ = self.account.postbox.transaction({ transaction in
transaction.reindexSavedMessagesCustomTagsWithTagsIfNeeded(peerId: self.account.peerId, threadId: threadId, tag: tag)
}).startStandalone()
}
}
}