Commit 922364ce authored by Vladislav Bogdashkin's avatar Vladislav Bogdashkin 🎣

fix interface;

fix download issue
parent 819946cb
......@@ -34,6 +34,10 @@ const val PENDING_REQUEST_CODE=0
interface INotificationCenter{
val foregroundDownloadServiceChannelId : Int
val foregroundDownloadServiceNotification: Notification
fun indeterminateProgressMessage(progress:Int=0
,progressMax:Int=0
,message: String)
......@@ -70,9 +74,9 @@ class NotificationCenter @Inject constructor(val context: Application) : INotif
private val icon = BitmapFactory.decodeResource(context.resources, R.mipmap.ic_launcher_round);
//Заготовка под интерфейсы для равзедения каналов нотификаций по разным инстансам
val foregroundDownloadServiceChannelId = DOWNLOAD_SERVICE_ID
override val foregroundDownloadServiceChannelId = DOWNLOAD_SERVICE_ID
val foregroundDownloadServiceNotification: Notification =
override val foregroundDownloadServiceNotification: Notification =
builder
.setContentTitle(context.getString(R.string.notification_content_title))//getString(R.string.app_name))
.setContentText(context.getString(R.string.notification_content_text))
......
......@@ -16,6 +16,7 @@ import com.biganto.visual.roomparkvr.data.repository.db.requery.model.TourPrevie
import io.reactivex.BackpressureStrategy
import io.reactivex.Flowable
import io.reactivex.Observable
import io.reactivex.rxkotlin.Observables
import io.reactivex.schedulers.Schedulers
import okhttp3.ResponseBody
import okio.Okio
......@@ -176,9 +177,9 @@ class DownloadUseCase @Inject constructor(
}
.flatMap{ list ->
tourDbModel?.let {
Observable.merge(
db.upsertTourPreview(it).map { list }, db.upsertTourFileJunction(list)
)
Observables.zip(
db.upsertTourPreview(it), db.upsertTourFileJunction(list)
).map { list }
}
}
.flatMapIterable { it }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment