mirror of
https://github.com/kiwix/kiwix-apple.git
synced 2025-09-26 21:39:37 -04:00
Merge pull request #687 from kiwix/675-systematic-crash-at-start-after-update-to-33
Fix default language when there's downloaded content already
This commit is contained in:
commit
529d418015
@ -150,6 +150,9 @@ class Languages {
|
||||
count.expressionResultType = .integer16AttributeType
|
||||
|
||||
let fetchRequest = NSFetchRequest<NSFetchRequestResult>(entityName: "ZimFile")
|
||||
// exclude the already downloaded files, they might have invalid language set
|
||||
// but we are mainly interested in fetched content
|
||||
fetchRequest.predicate = ZimFile.Predicate.notDownloaded
|
||||
fetchRequest.propertiesToFetch = ["languageCode", count]
|
||||
fetchRequest.propertiesToGroupBy = ["languageCode"]
|
||||
fetchRequest.resultType = .dictionaryResultType
|
||||
|
Loading…
x
Reference in New Issue
Block a user