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

fix trending tags for rtl languages #4889

Merged
merged 6 commits into from
Jan 23, 2025
Merged

fix trending tags for rtl languages #4889

merged 6 commits into from
Jan 23, 2025

Conversation

connyduck
Copy link
Collaborator

@connyduck connyduck commented Jan 22, 2025

closes #4887

And some other small improvements like better paddings and font sizes. Also the status_info in item_status now looks nicer in rtl mode.

@connyduck connyduck requested review from Tak, Lakoja and charlag January 22, 2025 20:19
@@ -41,7 +41,7 @@ class TrendingTagViewHolder(
binding.totalAccounts.text = formatNumber(totalAccounts, 1000)

binding.currentUsage.text = numberFormat.format(tagViewData.usage.last())
binding.currentAccounts.text = numberFormat.format(tagViewData.usage.last())
binding.currentAccounts.text = numberFormat.format(tagViewData.accounts.last())
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ooops we have been showing the wrong number all the time

@@ -8,7 +8,6 @@ import kotlin.math.abs
import kotlin.math.ln
import kotlin.math.pow

private val numberFormatter: NumberFormat = NumberFormat.getInstance()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The static NumberFormat is bad because it doesn't update when the locale changes.

@connyduck connyduck merged commit 8f8b819 into develop Jan 23, 2025
1 check passed
@connyduck connyduck deleted the trending-tags-rtl branch January 23, 2025 18:25
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.

Problem in showing trending hashtags in RTL layouts
2 participants