Skip to content

Commit

Permalink
Fix/round bottom group (#533)
Browse files Browse the repository at this point in the history
  • Loading branch information
kid1412621 authored Jan 16, 2024
1 parent 98934d1 commit dfceef6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions app/src/main/java/me/ash/reader/domain/model/group/Group.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,10 @@ data class Group(
*/
@Ignore
var important: Int? = 0

/**
* number of feeds within a group
* */
@Ignore
var feeds: Int = 0
}
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ fun FeedsPage(
group = groupWithFeed.group,
alpha = groupAlpha,
indicatorAlpha = groupIndicatorAlpha,
roundedBottomCorner = { index == groupWithFeedList.lastIndex || groupWithFeed.group.important == 0 },
roundedBottomCorner = { index == groupWithFeedList.lastIndex || groupWithFeed.group.feeds == 0 },
onExpanded = {
groupsVisible[groupWithFeed.group.id] = groupsVisible.getOrPut(
groupWithFeed.group.id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ class FeedsViewModel @Inject constructor(
while (feedIterator.hasNext()) {
val feed = feedIterator.next()
val feedImportant = importantMap[feed.id] ?: 0
groupWithFeed.group.feeds++
if ((isStarred || isUnread) && feedImportant == 0) {
feedIterator.remove()
continue
Expand Down

0 comments on commit dfceef6

Please sign in to comment.