mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 10:46:53 -04:00
Improved the downloading for custom apps.
* Improved the CI to run the test cases for custom app on same emulator.
This commit is contained in:
parent
3d29faf02e
commit
23fa4500df
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -101,7 +101,7 @@ jobs:
|
||||
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
|
||||
ram-size: 4096M
|
||||
cores: 4
|
||||
force-avd-creation: true
|
||||
force-avd-creation: false
|
||||
sdcard-path-or-size: 2048M
|
||||
disable-animations: true
|
||||
heap-size: 512M
|
||||
|
@ -20,6 +20,7 @@ package org.kiwix.kiwixmobile.core.downloader
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import io.reactivex.Observable
|
||||
import io.reactivex.schedulers.Schedulers
|
||||
import org.kiwix.kiwixmobile.core.dao.DownloadRoomDao
|
||||
import org.kiwix.kiwixmobile.core.data.remote.KiwixService
|
||||
import org.kiwix.kiwixmobile.core.entity.LibraryNetworkEntity
|
||||
@ -38,6 +39,7 @@ class DownloaderImpl @Inject constructor(
|
||||
override fun download(book: LibraryNetworkEntity.Book) {
|
||||
urlProvider(book)
|
||||
.take(1)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.subscribe(
|
||||
{
|
||||
downloadRoomDao.addIfDoesNotExist(it, book, downloadRequester, sharedPreferenceUtil)
|
||||
|
Loading…
x
Reference in New Issue
Block a user