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
817a65ce
Commit
817a65ce
authored
Apr 21, 2020
by
Vladislav Bogdashkin
🎣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix flat sold message
parent
56ddc3d9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletion
+10
-1
ScreenController.kt
.../roompark/presentation/screen/to_flat/ScreenController.kt
+8
-1
ScreenPresenter.kt
...l/roompark/presentation/screen/to_flat/ScreenPresenter.kt
+1
-0
ScreenViewState.kt
...l/roompark/presentation/screen/to_flat/ScreenViewState.kt
+1
-0
No files found.
app/src/main/java/com/biganto/visual/roompark/presentation/screen/to_flat/ScreenController.kt
View file @
817a65ce
...
...
@@ -126,6 +126,7 @@ class FindFlatScreenController :
is
FindFlatScreenViewState
.
SomeError
->
render
(
viewState
)
is
FindFlatScreenViewState
.
FlatFounded
->
render
(
viewState
)
is
FindFlatScreenViewState
.
FlatNotFound
->
render
(
viewState
)
is
FindFlatScreenViewState
.
FlatSold
->
render
(
viewState
)
is
FindFlatScreenViewState
.
StartFlat
->
render
(
viewState
)
is
FindFlatScreenViewState
.
RestoreView
->
render
(
viewState
)
}
...
...
@@ -156,8 +157,14 @@ class FindFlatScreenController :
{
findFlatButton
.
text
=
resources
?.
getString
(
it
)},
{
findFlatButton
.
text
=
it
}
)
}
private
fun
render
(
viewState
:
FindFlatScreenViewState
.
FlatSold
){
findFlatButton
.
isEnabled
=
false
viewState
.
exceptionString
.
selectHandler
(
{
findFlatButton
.
text
=
resources
?.
getString
(
it
)},
{
findFlatButton
.
text
=
it
}
)
}
private
fun
render
(
viewState
:
FindFlatScreenViewState
.
StartFlat
){
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/to_flat/ScreenPresenter.kt
View file @
817a65ce
...
...
@@ -37,6 +37,7 @@ class FindFlatScreenPresenter @Inject constructor(
override
fun
vsByCode
(
code
:
Int
):
(
ExceptionString
)
->
FindFlatScreenViewState
=
when
(
code
)
{
304
->
{
message
:
ExceptionString
->
FindFlatScreenViewState
.
FlatNotFound
(
message
)}
307
->
{
message
:
ExceptionString
->
FindFlatScreenViewState
.
FlatSold
(
message
)}
else
->
super
.
vsByCode
(
code
)
}
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/to_flat/ScreenViewState.kt
View file @
817a65ce
...
...
@@ -13,6 +13,7 @@ sealed class FindFlatScreenViewState : BigantoBaseViewState() {
class
RequstFlatProgress
:
FindFlatScreenViewState
()
class
FlatFounded
:
FindFlatScreenViewState
()
class
FlatNotFound
(
val
exceptionString
:
ExceptionString
)
:
FindFlatScreenViewState
()
class
FlatSold
(
val
exceptionString
:
ExceptionString
)
:
FindFlatScreenViewState
()
class
StartFlat
(
val
esateId
:
Int
)
:
FindFlatScreenViewState
()
class
SomeError
(
val
exception
:
ExceptionString
)
:
FindFlatScreenViewState
()
class
RestoreView
(
val
restore
:
RestoreModel
)
:
FindFlatScreenViewState
()
...
...
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