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
788778b9
Commit
788778b9
authored
Apr 10, 2020
by
Vladislav Bogdashkin
🎣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed
parent
103bc906
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
ScreenController.kt
...oompark/presentation/screen/feed_list/ScreenController.kt
+0
-1
ScreenPresenter.kt
...roompark/presentation/screen/feed_list/ScreenPresenter.kt
+3
-3
ScreenViewState.kt
...roompark/presentation/screen/feed_list/ScreenViewState.kt
+1
-0
No files found.
app/src/main/java/com/biganto/visual/roompark/presentation/screen/feed_list/ScreenController.kt
View file @
788778b9
...
@@ -89,7 +89,6 @@ class ArticlesScreenController :
...
@@ -89,7 +89,6 @@ class ArticlesScreenController :
lateinit
var
emptyListNotice
:
MaterialTextView
lateinit
var
emptyListNotice
:
MaterialTextView
private
fun
setToolbar
()
{
private
fun
setToolbar
()
{
articlesRecyclerView
.
isNestedScrollingEnabled
=
false
articlesRecyclerView
.
isNestedScrollingEnabled
=
false
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/feed_list/ScreenPresenter.kt
View file @
788778b9
...
@@ -54,18 +54,18 @@ class ArticlesScreenPresenter @Inject constructor(
...
@@ -54,18 +54,18 @@ class ArticlesScreenPresenter @Inject constructor(
}
}
val
fetchSubscription
=
interactor
.
getSubscriptions
(
feedId
)
val
fetchSubscription
=
interactor
.
getSubscriptions
(
feedId
)
.
doOnNext
{
Timber
.
w
(
"got smthng: $it"
)
}
.
doAfterNext
{
restoreModel
.
sub
=
it
}
.
doAfterNext
{
restoreModel
.
sub
=
it
}
.
map
<
ArticlesScreenViewState
>
{
ArticlesScreenViewState
.
SubscriptionStatus
(
it
.
state
)
}
.
map
<
ArticlesScreenViewState
>
{
ArticlesScreenViewState
.
SubscriptionStatus
(
it
.
state
)
}
.
startWith
(
Observable
.
just
<
ArticlesScreenViewState
>(
ArticlesScreenViewState
.
Idle
()))
.
startWith
(
Observable
.
just
<
ArticlesScreenViewState
>(
ArticlesScreenViewState
.
Idle
()))
val
prefetchCards
=
interactor
.
fetchArticles
(
feedId
)
val
prefetchCards
=
interactor
.
fetchArticles
(
feedId
)
.
doOnNext
{
restoreModel
.
articles
.
addAll
(
it
.
articles
)
}
.
map
<
ArticlesScreenViewState
>
{
ArticlesScreenViewState
.
ArticlesLoaded
(
it
.
articles
)
}
.
map
<
ArticlesScreenViewState
>
{
ArticlesScreenViewState
.
ArticlesLoaded
(
it
.
articles
)
}
.
startWith
(
Observable
.
just
<
ArticlesScreenViewState
>(
ArticlesScreenViewState
.
Idle
()))
.
startWith
(
Observable
.
just
<
ArticlesScreenViewState
>(
ArticlesScreenViewState
.
Idle
()))
val
getNewArticlesPage
=
intent
(
ArticlesScreen
::
requsetsNewArticles
)
val
getNewArticlesPage
=
intent
(
ArticlesScreen
::
requsetsNewArticles
)
.
flatMap
{
.
flatMap
{
currentItem
->
interactor
.
fetchArticlesPage
(
feedId
,
FEED_PAGE_SIZE
,
it
)
interactor
.
fetchArticlesPage
(
feedId
,
FEED_PAGE_SIZE
,
currentItem
)
.
map
<
ArticlesScreenViewState
>
{
articlePage
->
.
map
<
ArticlesScreenViewState
>
{
articlePage
->
articlePage
.
articles
articlePage
.
articles
.
asSequence
()
.
asSequence
()
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/feed_list/ScreenViewState.kt
View file @
788778b9
...
@@ -18,3 +18,4 @@ sealed class ArticlesScreenViewState : BigantoBaseViewState() {
...
@@ -18,3 +18,4 @@ sealed class ArticlesScreenViewState : BigantoBaseViewState() {
class
SubscriptionStatus
(
val
subState
:
Boolean
)
:
ArticlesScreenViewState
()
class
SubscriptionStatus
(
val
subState
:
Boolean
)
:
ArticlesScreenViewState
()
class
SubscriptionError
(
val
subState
:
Boolean
)
:
ArticlesScreenViewState
()
class
SubscriptionError
(
val
subState
:
Boolean
)
:
ArticlesScreenViewState
()
}
}
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