diff --git a/app/src/main/java/me/ash/reader/domain/model/group/Group.kt b/app/src/main/java/me/ash/reader/domain/model/group/Group.kt index 7bd3e58dd..74e9efca2 100644 --- a/app/src/main/java/me/ash/reader/domain/model/group/Group.kt +++ b/app/src/main/java/me/ash/reader/domain/model/group/Group.kt @@ -18,6 +18,9 @@ data class Group( var accountId: Int, ) { + /** + * see [me.ash.reader.domain.model.feed.ImportantNum.important] + */ @Ignore var important: Int? = 0 } diff --git a/app/src/main/java/me/ash/reader/ui/page/home/feeds/FeedsPage.kt b/app/src/main/java/me/ash/reader/ui/page/home/feeds/FeedsPage.kt index bdc6699f9..a3cee9dfe 100644 --- a/app/src/main/java/me/ash/reader/ui/page/home/feeds/FeedsPage.kt +++ b/app/src/main/java/me/ash/reader/ui/page/home/feeds/FeedsPage.kt @@ -1,6 +1,5 @@ package me.ash.reader.ui.page.home.feeds -import android.util.Log import androidx.activity.compose.BackHandler import androidx.compose.animation.core.* import androidx.compose.foundation.clickable @@ -229,7 +228,7 @@ fun FeedsPage( group = groupWithFeed.group, alpha = groupAlpha, indicatorAlpha = groupIndicatorAlpha, - isEnded = { index == groupWithFeedList.lastIndex }, + roundedBottomCorner = { index == groupWithFeedList.lastIndex || groupWithFeed.group.important == 0 }, onExpanded = { groupsVisible[groupWithFeed.group.id] = groupsVisible.getOrPut( groupWithFeed.group.id, diff --git a/app/src/main/java/me/ash/reader/ui/page/home/feeds/GroupItem.kt b/app/src/main/java/me/ash/reader/ui/page/home/feeds/GroupItem.kt index abef87212..2850e8efc 100644 --- a/app/src/main/java/me/ash/reader/ui/page/home/feeds/GroupItem.kt +++ b/app/src/main/java/me/ash/reader/ui/page/home/feeds/GroupItem.kt @@ -35,7 +35,7 @@ fun GroupItem( group: Group, alpha: Float = 1f, indicatorAlpha: Float = 1f, - isEnded: () -> Boolean, + roundedBottomCorner: () -> Boolean, isExpanded: () -> Boolean, groupOptionViewModel: GroupOptionViewModel = hiltViewModel(), onExpanded: () -> Unit = {}, @@ -49,7 +49,7 @@ fun GroupItem( .animateContentSize() .fillMaxWidth() .padding(horizontal = 16.dp) - .clip(if (isExpanded() && !isEnded()) ShapeTop32 else Shape32) + .clip(if (isExpanded() && !roundedBottomCorner()) ShapeTop32 else Shape32) .background(MaterialTheme.colorScheme.secondary.copy(alpha = alpha)) .combinedClickable( onClick = { diff --git a/app/src/main/java/me/ash/reader/ui/page/settings/color/feeds/FeedsPagePreview.kt b/app/src/main/java/me/ash/reader/ui/page/settings/color/feeds/FeedsPagePreview.kt index abefbc3e7..e1a294e86 100644 --- a/app/src/main/java/me/ash/reader/ui/page/settings/color/feeds/FeedsPagePreview.kt +++ b/app/src/main/java/me/ash/reader/ui/page/settings/color/feeds/FeedsPagePreview.kt @@ -94,7 +94,7 @@ fun FeedsPagePreview( ) Spacer(modifier = Modifier.height(12.dp)) GroupItem( - isEnded = { false }, + roundedBottomCorner = { false }, isExpanded = { groupListExpand.value }, group = generateGroupPreview(), alpha = groupAlpha,