Skip to content

Commit

Permalink
Revert "Enable placeholders in paginated posts list"
Browse files Browse the repository at this point in the history
This reverts commit bdcb3d1.
  • Loading branch information
msasikanth committed Feb 8, 2024
1 parent 8760996 commit 78b4645
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ class HomePresenter(
}

val posts =
createPager(config = createPagingConfig(pageSize = 20, enablePlaceholders = true)) {
createPager(config = createPagingConfig(pageSize = 20, enablePlaceholders = false)) {
rssRepository.posts(
selectedFeedLink = selectedFeed?.link,
unreadOnly = unreadOnly,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,13 @@ package dev.sasikanth.rss.reader.home.ui
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.WindowInsetsSides
import androidx.compose.foundation.layout.only
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.requiredHeight
import androidx.compose.foundation.layout.requiredSize
import androidx.compose.foundation.layout.systemBars
import androidx.compose.foundation.layout.windowInsetsPadding
Expand Down Expand Up @@ -117,15 +115,13 @@ internal fun PostsList(
onPostSourceClick = { onPostSourceClick(post.feedLink) },
togglePostReadClick = { onTogglePostReadClick(post.link, post.read) }
)
} else {
Box(Modifier.requiredHeight(132.dp))
}

if (index != posts.itemCount - 1) {
Divider(
modifier = Modifier.fillParentMaxWidth().padding(horizontal = 24.dp),
color = AppTheme.colorScheme.surfaceContainer
)
if (index != posts.itemCount - 1) {
Divider(
modifier = Modifier.fillParentMaxWidth().padding(horizontal = 24.dp),
color = AppTheme.colorScheme.surfaceContainer
)
}
}
}
}
Expand Down

0 comments on commit 78b4645

Please sign in to comment.