Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ import com.nononsenseapps.feeder.ui.compose.utils.PreviewThemes
import com.nononsenseapps.feeder.ui.compose.utils.onKeyEventLikeEscape
import java.net.URL
import java.time.Instant

import androidx.compose.ui.graphics.Color
import androidx.compose.material3.LocalContentColor
@Composable
fun FeedItemCard(
item: FeedListItem,
Expand Down Expand Up @@ -210,6 +211,12 @@ fun RowScope.FeedItemText(
}
}
val closeMenuText = stringResource(id = R.string.close_menu)
// The color of unread items remains unchanged, and the color of read items increases transparency
val titleColor = if (item.unread) {
Color.Unspecified // Use the default color and do not change the color of unread items
} else {
LocalContentColor.current.copy(alpha = 0.74f) //Increase transparency of read item color
}
Comment on lines +214 to +219

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of this should be moved inside the FeedListItemTitleTextStyle function in Typography.kt. See how the the font weight uses the unread flag:

fontWeight = titleFontWeight(item.unread)

Column(
verticalArrangement = Arrangement.spacedBy(4.dp),
modifier =
Expand All @@ -219,7 +226,7 @@ fun RowScope.FeedItemText(
WithBidiDeterminedLayoutDirection(paragraph = joinedText.text) {
Text(
text = joinedText,
style = FeedListItemTitleTextStyle(),
style = FeedListItemTitleTextStyle().copy(color = titleColor),
fontWeight = titleFontWeight(item.unread),
overflow = TextOverflow.Ellipsis,
maxLines = maxLines,
Expand Down