mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Merge pull request #1625 from omnivore-app/fix/ios-search-if-no-items
Fall back to using search instead of just sync API if no items found
This commit is contained in:
commit
c80736c7b5
36 changed files with 8 additions and 7 deletions
|
|
@ -194,13 +194,14 @@ import Views
|
|||
await group.waitForAll()
|
||||
}
|
||||
|
||||
if searchTerm.replacingOccurrences(of: " ", with: "").isEmpty {
|
||||
updateFetchController(dataService: dataService)
|
||||
if appliedFilter != LinkedItemFilter.inbox.rawValue || !isRefresh {
|
||||
await loadSearchQuery(dataService: dataService, isRefresh: isRefresh)
|
||||
}
|
||||
} else {
|
||||
let shouldSearch = items.count < 1 || isRefresh
|
||||
if shouldSearch {
|
||||
await loadSearchQuery(dataService: dataService, isRefresh: isRefresh)
|
||||
} else {
|
||||
updateFetchController(dataService: dataService)
|
||||
Task.detached(priority: .background) {
|
||||
await self.loadSearchQuery(dataService: dataService, isRefresh: isRefresh)
|
||||
}
|
||||
}
|
||||
|
||||
isLoading = false
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -22,7 +22,7 @@ public struct CommunityModal: View {
|
|||
things you can do to help us build a better Omnivore.
|
||||
|
||||
If you would like to financially assist Omnivore \
|
||||
please [Contribute on Open Collective](https://opencollective.com/omnivore).
|
||||
please [contribute on Open Collective](https://opencollective.com/omnivore).
|
||||
"""
|
||||
|
||||
public init() {}
|
||||
|
|
|
|||
Loading…
Reference in a new issue