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 ...@@ -34,6 +34,10 @@ const val PENDING_REQUEST_CODE=0
interface INotificationCenter{ interface INotificationCenter{
val foregroundDownloadServiceChannelId : Int
val foregroundDownloadServiceNotification: Notification
fun indeterminateProgressMessage(progress:Int=0 fun indeterminateProgressMessage(progress:Int=0
,progressMax:Int=0 ,progressMax:Int=0
,message: String) ,message: String)
...@@ -70,9 +74,9 @@ class NotificationCenter @Inject constructor(val context: Application) : INotif ...@@ -70,9 +74,9 @@ class NotificationCenter @Inject constructor(val context: Application) : INotif
private val icon = BitmapFactory.decodeResource(context.resources, R.mipmap.ic_launcher_round); 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 builder
.setContentTitle(context.getString(R.string.notification_content_title))//getString(R.string.app_name)) .setContentTitle(context.getString(R.string.notification_content_title))//getString(R.string.app_name))
.setContentText(context.getString(R.string.notification_content_text)) .setContentText(context.getString(R.string.notification_content_text))
......
...@@ -16,6 +16,7 @@ import com.biganto.visual.roomparkvr.data.repository.db.requery.model.TourPrevie ...@@ -16,6 +16,7 @@ import com.biganto.visual.roomparkvr.data.repository.db.requery.model.TourPrevie
import io.reactivex.BackpressureStrategy import io.reactivex.BackpressureStrategy
import io.reactivex.Flowable import io.reactivex.Flowable
import io.reactivex.Observable import io.reactivex.Observable
import io.reactivex.rxkotlin.Observables
import io.reactivex.schedulers.Schedulers import io.reactivex.schedulers.Schedulers
import okhttp3.ResponseBody import okhttp3.ResponseBody
import okio.Okio import okio.Okio
...@@ -176,9 +177,9 @@ class DownloadUseCase @Inject constructor( ...@@ -176,9 +177,9 @@ class DownloadUseCase @Inject constructor(
} }
.flatMap{ list -> .flatMap{ list ->
tourDbModel?.let { tourDbModel?.let {
Observable.merge( Observables.zip(
db.upsertTourPreview(it).map { list }, db.upsertTourFileJunction(list) db.upsertTourPreview(it), db.upsertTourFileJunction(list)
) ).map { list }
} }
} }
.flatMapIterable { it } .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