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
5ba7d8c6
Commit
5ba7d8c6
authored
Mar 17, 2020
by
Vladislav Bogdashkin
🎣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
deal preview tour provided
parent
cec8e61b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
4 deletions
+16
-4
EstateRepository.kt
...to/visual/roompark/data/data_provider/EstateRepository.kt
+3
-2
RetrofitModule.kt
...oompark/data/repository/api/retrofit/di/RetrofitModule.kt
+1
-1
ScreenController.kt
...ual/roompark/presentation/screen/deal/ScreenController.kt
+10
-0
Adapter.kt
...visual/roompark/presentation/screen/deals/util/Adapter.kt
+1
-0
deal_screen.xml
app/src/main/res/layout/deal_screen.xml
+1
-1
No files found.
app/src/main/java/com/biganto/visual/roompark/data/data_provider/EstateRepository.kt
View file @
5ba7d8c6
...
...
@@ -197,6 +197,7 @@ class EstateRepository @Inject constructor(
private
val
getDealsApi
:
Observable
<
List
<
DealEntity
>>
=
local
.
recentUser
()
.
doOnError
(
Timber
::
e
)
.
flatMap
{
when
(
it
)
{
is
UserState
.
Authenticated
->
db
.
fetchUser
(
it
.
uuid
.
toInt
())
...
...
@@ -230,8 +231,8 @@ class EstateRepository @Inject constructor(
override
fun
getDeals
():
Observable
<
List
<
DealModel
>>
{
return
Observable
.
mergeDelayError
(
arrayListOf
(
getDealsDb
,
getDealsApi
getDealsDb
,
getDealsApi
)
)
.
map
{
fromEntity
(
it
,
::
fromEntity
)
}
...
...
app/src/main/java/com/biganto/visual/roompark/data/repository/api/retrofit/di/RetrofitModule.kt
View file @
5ba7d8c6
...
...
@@ -34,7 +34,7 @@ private const val TIMEOUT_SECONDS=120L
private
const
val
WRITE_SECONDS
=
120L
private
const
val
READ_SECONDS
=
120L
val
INTERCEPT_LOG_LEVEL
=
HttpLoggingInterceptor
.
Level
.
HEADERS
val
INTERCEPT_LOG_LEVEL
=
HttpLoggingInterceptor
.
Level
.
NONE
@Module
class
RetrofitModule
{
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/deal/ScreenController.kt
View file @
5ba7d8c6
...
...
@@ -17,10 +17,12 @@ import com.biganto.visual.roompark.domain.model.typeDoubleString
import
com.biganto.visual.roompark.domain.model.typeShortString
import
com.biganto.visual.roompark.presentation.screen.estate.EstateScreenController
import
com.biganto.visual.roompark.util.extensions.toRubly
import
com.biganto.visual.roompark.util.view_utils.image_view.RoundedImageView
import
com.biganto.visual.roompark.util.view_utils.status_progress_view.StatusProgressAnimationState
import
com.biganto.visual.roompark.util.view_utils.status_progress_view.StatusProgressCeil
import
com.bluelinelabs.conductor.RouterTransaction
import
com.bluelinelabs.conductor.changehandler.FadeChangeHandler
import
com.bumptech.glide.Glide
import
com.google.android.material.textview.MaterialTextView
import
com.jakewharton.rxbinding3.view.clicks
import
com.jakewharton.rxbinding3.view.scrollChangeEvents
...
...
@@ -85,6 +87,9 @@ class DealScreenController :
@BindView
(
R
.
id
.
start_tour_card
)
lateinit
var
startTourView
:
View
@BindView
(
R
.
id
.
start_tour_image_view
)
lateinit
var
tourScreen
:
RoundedImageView
private
var
servedDeal
:
DealModel
?
=
null
override
fun
onAttach
(
view
:
View
)
{
...
...
@@ -204,6 +209,11 @@ class DealScreenController :
dealPayed
.
text
=
viewState
.
estate
.
paymentSum
.
toRubly
()
dealSumToPay
.
text
=
viewState
.
estate
.
amount_pay_sum
.
toRubly
()
viewState
.
estate
.
estate
.
multitourPreview
?.
let
{
Glide
.
with
(
tourScreen
)
.
load
(
it
)
.
into
(
tourScreen
)
}
dealModel
=
viewState
.
estate
toolBar
.
setToolbar
(
HeaderToolbarModel
(
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/deals/util/Adapter.kt
View file @
5ba7d8c6
...
...
@@ -92,6 +92,7 @@ class DealViewHolder(itemView: View) : CommonViewHolder<DealPreviewModel>(itemVi
statusLayout
.
addView
(
currentStatusText
,
0
)
statusLayout
.
invalidate
()
model
.
tourPreview
?.
let
{
Glide
.
with
(
tourScreen
)
.
load
(
it
)
...
...
app/src/main/res/layout/deal_screen.xml
View file @
5ba7d8c6
...
...
@@ -235,7 +235,7 @@
android:id=
"@+id/start_tour_card"
layout=
"@layout/start_tour_viewholder_big"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
android:layout_height=
"wrap_content"
/>
<include
layout=
"@layout/horizontal_divider"
...
...
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