Skip to content
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

improve margin between post content and buttons #4981

Merged
merged 1 commit into from
Mar 10, 2025

Conversation

connyduck
Copy link
Collaborator

A user made me aware of the fact that we have varying spacing between post content and the buttons, so I investigated 🧐

Indeed, there were some problems:

  • The trailing hashtags bar was sometimes visible, despite not showing any content.
  • The media container was visible despite showing no media
  • The buttons where layed out differently when showing a conversation

This change fixes those problems and adds an additional 2dp space between buttons and contents because without these issues the buttons and the content are quite close otherwise.

@connyduck connyduck requested review from Tak, Lakoja and charlag March 8, 2025 14:20
@@ -86,7 +86,7 @@ fun setClickableText(
trailingHashtagView == null || tags.isNullOrEmpty() -> Pair(spannableContent.length, emptyList())
else -> getTrailingHashtags(spannableContent)
}
val inlineHashtags = mutableListOf<CharSequence>()
val inlineHashtags = mutableSetOf<CharSequence>()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is so we count hashtags only once, no matter how often they appear. Otherwise the showHashtagBar check below is wrong for posts that use a hashtag multiple times.

@connyduck connyduck merged commit 0be0aa6 into develop Mar 10, 2025
1 check passed
@connyduck connyduck deleted the improve-margin-between-post-content-and-buttons branch March 10, 2025 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants