Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Room Park Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vladislav Bogdashkin
Room Park Android
Commits
922364ce
Commit
922364ce
authored
Apr 14, 2020
by
Vladislav Bogdashkin
🎣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix interface;
fix download issue
parent
819946cb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
NotificationCenter.kt
.../roompark/data/service/notification/NotificationCenter.kt
+6
-2
DownloadUseCase.kt
...iganto/visual/roompark/domain/use_case/DownloadUseCase.kt
+4
-3
No files found.
app/src/main/java/com/biganto/visual/roompark/data/service/notification/NotificationCenter.kt
View file @
922364ce
...
...
@@ -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
))
...
...
app/src/main/java/com/biganto/visual/roompark/domain/use_case/DownloadUseCase.kt
View file @
922364ce
...
...
@@ -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
)
)
Observable
s
.
zip
(
db
.
upsertTourPreview
(
it
),
db
.
upsertTourFileJunction
(
list
)
)
.
map
{
list
}
}
}
.
flatMapIterable
{
it
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment