mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 02:58:07 +00:00
Remove unneeded dispatch queue in magicsearch
This commit is contained in:
parent
b40110f919
commit
ae1180c222
1 changed files with 11 additions and 12 deletions
|
|
@ -111,14 +111,14 @@ final class MagicSearchSingleton: ObservableObject {
|
|||
coreContext.doOnCoreQueue { _ in
|
||||
var needResetCache = false
|
||||
|
||||
DispatchQueue.main.sync {
|
||||
if let oldFilter = self.previousFilter {
|
||||
if oldFilter.count > self.currentFilter.count || oldFilter != self.currentFilter {
|
||||
needResetCache = true
|
||||
}
|
||||
if let oldFilter = self.previousFilter {
|
||||
if oldFilter.count > self.currentFilter.count || oldFilter != self.currentFilter {
|
||||
needResetCache = true
|
||||
}
|
||||
self.previousFilter = self.currentFilter
|
||||
}
|
||||
self.previousFilter = self.currentFilter
|
||||
|
||||
|
||||
if needResetCache {
|
||||
self.magicSearch.resetSearchCache()
|
||||
}
|
||||
|
|
@ -135,14 +135,13 @@ final class MagicSearchSingleton: ObservableObject {
|
|||
coreContext.doOnCoreQueue { _ in
|
||||
var needResetCache = false
|
||||
|
||||
DispatchQueue.main.sync {
|
||||
if let oldFilter = self.previousFilterSuggestions {
|
||||
if oldFilter.count > self.currentFilterSuggestions.count || oldFilter != self.currentFilterSuggestions {
|
||||
needResetCache = true
|
||||
}
|
||||
if let oldFilter = self.previousFilterSuggestions {
|
||||
if oldFilter.count > self.currentFilterSuggestions.count || oldFilter != self.currentFilterSuggestions {
|
||||
needResetCache = true
|
||||
}
|
||||
self.previousFilterSuggestions = self.currentFilterSuggestions
|
||||
}
|
||||
self.previousFilterSuggestions = self.currentFilterSuggestions
|
||||
|
||||
if needResetCache {
|
||||
self.magicSearch.resetSearchCache()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue