-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move time ago and score to a flowrow layout #1615
Merged
Merged
Changes from 3 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
733df97
Some material 3 cleanups.
dessalines 0bf14fa
Moving post attribution to below title.
dessalines 5dadc16
Merge branch 'main' into move_time_ago_and_score
dessalines c1c8343
Re-arranging time and scores.
dessalines 68778f9
Fixing comment node header align.
dessalines be8ab81
Fixing hide vote scores.
dessalines 4f27431
Merge remote-tracking branch 'origin/main' into move_time_ago_and_score
dessalines aaae70b
Fixing post report item.
dessalines 0baed31
Make post report name clickable
dessalines File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -258,8 +258,7 @@ fun CommentOrPostNodeHeader( | |
voteDisplayMode: LocalUserVoteDisplayMode, | ||
) { | ||
FlowRow( | ||
horizontalArrangement = Arrangement.SpaceBetween, | ||
verticalArrangement = Arrangement.Center, | ||
horizontalArrangement = Arrangement.spacedBy(SMALLER_PADDING, Alignment.Start), | ||
modifier = | ||
Modifier | ||
.fillMaxWidth() | ||
|
@@ -273,36 +272,40 @@ fun CommentOrPostNodeHeader( | |
bottom = MEDIUM_PADDING, | ||
), | ||
) { | ||
Row( | ||
horizontalArrangement = Arrangement.spacedBy(SMALL_PADDING), | ||
verticalAlignment = Alignment.CenterVertically, | ||
) { | ||
if (deleted) { | ||
Icon( | ||
imageVector = Icons.Outlined.Delete, | ||
contentDescription = stringResource(R.string.commentOrPostHeader_deleted), | ||
tint = MaterialTheme.colorScheme.error, | ||
) | ||
DotSpacer(style = MaterialTheme.typography.bodyMedium) | ||
} | ||
|
||
PersonProfileLink( | ||
person = creator, | ||
onClick = { onPersonClick(creator.id) }, | ||
showTags = true, | ||
isPostCreator = isPostCreator, | ||
isDistinguished = isDistinguished, | ||
isCommunityBanned = isCommunityBanned, | ||
showAvatar = showAvatar, | ||
val centerMod = Modifier.align(Alignment.CenterVertically) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This centerMod is necessary on FlowRows unfortunately. I wish it could do some cross-axis alignment, but it doesn't seem to work. |
||
if (deleted) { | ||
Icon( | ||
imageVector = Icons.Outlined.Delete, | ||
contentDescription = stringResource(R.string.commentOrPostHeader_deleted), | ||
tint = MaterialTheme.colorScheme.error, | ||
modifier = centerMod, | ||
) | ||
DotSpacer(modifier = centerMod) | ||
} | ||
ScoreAndTime( | ||
|
||
PersonProfileLink( | ||
person = creator, | ||
onClick = { onPersonClick(creator.id) }, | ||
showTags = true, | ||
isPostCreator = isPostCreator, | ||
isDistinguished = isDistinguished, | ||
isCommunityBanned = isCommunityBanned, | ||
showAvatar = showAvatar, | ||
modifier = centerMod, | ||
) | ||
DotSpacer(modifier = centerMod) | ||
ScoreCombined( | ||
instantScores = instantScores, | ||
published = published, | ||
updated = updated, | ||
isExpanded = isExpanded, | ||
collapsedCommentsCount = collapsedCommentsCount, | ||
voteDisplayMode = voteDisplayMode, | ||
modifier = centerMod, | ||
) | ||
DotSpacer(modifier = centerMod) | ||
TimeAgo( | ||
published = published, | ||
updated = updated, | ||
modifier = centerMod, | ||
) | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved this as its only used here.