Skip to content

Conversation

@dogi
Copy link
Member

@dogi dogi commented Nov 10, 2025

Moves the blocking Realm query in DashboardActivity.handleSurveyNavigation to a background thread to prevent potential ANRs.

  • Converted handleSurveyNavigation to a suspend function.
  • Wrapped the Realm query in withContext(Dispatchers.IO).
  • Used realm.copyFromRealm to pass the result to the main thread safely.
  • Updated the call site in handleNotificationIntent to launch the function in lifecycleScope.

https://jules.google.com/session/17535306670402348032

Moves the blocking Realm query in `DashboardActivity.handleSurveyNavigation` to a background thread to prevent potential ANRs.

- Converted `handleSurveyNavigation` to a `suspend` function.
- Wrapped the Realm query in `withContext(Dispatchers.IO)`.
- Used `realm.copyFromRealm` to pass the result to the main thread safely.
- Updated the call site in `handleNotificationIntent` to launch the function in `lifecycleScope`.
@dogi dogi closed this Nov 10, 2025
@dogi dogi reopened this Nov 10, 2025
@dogi dogi removed the close? label Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants