mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-23 04:33:54 -04:00
Merge pull request #1345 from kiwix/abdulwd/issue1342
Add only distinct zims to local database
This commit is contained in:
commit
fd0b08cca1
@ -41,7 +41,7 @@ class NewBookDao @Inject constructor(private val box: Box<BookOnDiskEntity>) {
|
||||
inValues(BookOnDiskEntity_.bookId, booksOnDisk.map { it.book.id }.toTypedArray())
|
||||
}
|
||||
.remove()
|
||||
box.put(booksOnDisk.map(::BookOnDiskEntity))
|
||||
box.put(booksOnDisk.distinctBy { it.book.id }.map(::BookOnDiskEntity))
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user