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

TextMeasurer.measure only works in Dispatchers.Main on ios #4168

Closed
Mohamed-Mabrouki opened this issue Jul 8, 2024 · 1 comment
Closed
Labels

Comments

@Mohamed-Mabrouki
Copy link

i have a text measurement that is pretty heavy so Dispatchers.Main will cause lag but when i change the context to another dispatcher it works fine on android but it crashes on ios.

textLayoutResult = textMeasurer.measure( text = simpleAnnotatedString, style = defaultStyle.copy( fontSize = fontSize.sp, fontWeight = FontWeight(uiState.fontWeight), ), constraints = Constraints.fixed( width = lineWidth, height = lineHeight, ), maxLines = 1, softWrap = false, overflow = TextOverflow.Visible, )

@dkhalanskyjb
Copy link
Collaborator

Duplicate of JetBrains/compose-multiplatform#5073. Also, this isn't even the right issue tracker: this is for the coroutines library.

@dkhalanskyjb dkhalanskyjb closed this as not planned Won't fix, can't repro, duplicate, stale Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants