Fix/round bottom group (#533)

This commit is contained in:
kid1412621 2024-01-16 22:25:35 +08:00 committed by GitHub
parent 98934d1bab
commit dfceef6c7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 1 deletions

View File

@ -23,4 +23,10 @@ data class Group(
*/
@Ignore
var important: Int? = 0
/**
* number of feeds within a group
* */
@Ignore
var feeds: Int = 0
}

View File

@ -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,

View File

@ -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