Skip to content

Commit

Permalink
Show no pinned sources tooltip only if there are feeds
Browse files Browse the repository at this point in the history
  • Loading branch information
msasikanth committed May 5, 2024
1 parent e5635d1 commit 7a0b7dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import dev.sasikanth.rss.reader.ui.AppTheme
@Composable
internal fun BottomSheetCollapsedContent(
pinnedSources: LazyPagingItems<Source>,
numberOfFeeds: Int,
activeSource: Source?,
canShowUnreadPostsCount: Boolean,
onSourceClick: (Source) -> Unit,
Expand Down Expand Up @@ -109,7 +110,7 @@ internal fun BottomSheetCollapsedContent(
}
}

if (pinnedSources.itemCount == 0) {
if (pinnedSources.itemCount == 0 && numberOfFeeds > 0) {
Box(
modifier = Modifier.fillMaxWidth().requiredHeight(height = 64.dp),
contentAlignment = Alignment.Center
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ internal fun FeedsBottomSheet(
BottomSheetCollapsedContent(
modifier = Modifier.graphicsLayer { alpha = bottomSheetExpandingProgress },
pinnedSources = state.pinnedSources.collectAsLazyPagingItems(),
numberOfFeeds = state.numberOfFeeds,
activeSource = state.activeSource,
canShowUnreadPostsCount = state.canShowUnreadPostsCount,
onSourceClick = { feed -> feedsPresenter.dispatch(FeedsEvent.OnSourceClick(feed)) },
Expand Down

0 comments on commit 7a0b7dc

Please sign in to comment.