mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Refactoring
This commit is contained in:
@@ -433,7 +433,7 @@ final class ThemeGridSearchContentNode: SearchDisplayControllerContentNode {
|
||||
|
||||
let query = strongSelf.queryValue.query
|
||||
if !query.isEmpty {
|
||||
let _ = addRecentWallpaperSearchQuery(postbox: strongSelf.context.account.postbox, string: query).start()
|
||||
let _ = addRecentWallpaperSearchQuery(engine: strongSelf.context.engine, string: query).start()
|
||||
}
|
||||
}
|
||||
}, selectColor: { [weak self] color in
|
||||
@@ -444,12 +444,10 @@ final class ThemeGridSearchContentNode: SearchDisplayControllerContentNode {
|
||||
return query
|
||||
}, updateInterface: true)
|
||||
}, deleteRecentQuery: { query in
|
||||
let _ = removeRecentWallpaperSearchQuery(postbox: context.account.postbox, string: query).start()
|
||||
let _ = removeRecentWallpaperSearchQuery(engine: context.engine, string: query).start()
|
||||
})
|
||||
|
||||
let configuration = self.context.account.postbox.transaction { transaction -> SearchBotsConfiguration in
|
||||
return currentSearchBotsConfiguration(transaction: transaction)
|
||||
}
|
||||
let configuration = self.context.engine.data.get(TelegramEngine.EngineData.Item.Configuration.SearchBots())
|
||||
|
||||
let foundItems = self.queryPromise.get()
|
||||
|> mapToSignal { query -> Signal<([ThemeGridSearchEntry], Bool)?, NoError> in
|
||||
@@ -582,7 +580,7 @@ final class ThemeGridSearchContentNode: SearchDisplayControllerContentNode {
|
||||
}
|
||||
|
||||
let header = ChatListSearchItemHeader(type: .recentPeers, theme: presentationData.theme, strings: presentationData.strings, actionTitle: presentationData.strings.WebSearch_RecentSectionClear, action: {
|
||||
_ = clearRecentWallpaperSearchQueries(postbox: strongSelf.context.account.postbox).start()
|
||||
let _ = clearRecentWallpaperSearchQueries(engine: strongSelf.context.engine).start()
|
||||
})
|
||||
|
||||
let previousEntries = previousRecentItems.swap(entries)
|
||||
|
||||
Reference in New Issue
Block a user