-
Notifications
You must be signed in to change notification settings - Fork 171
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
[SES-2512] Rewrite ProfilePictureView #1622
Conversation
// to launch a coroutine from a view. The potential memory leak is not a concern here, as | ||
// the coroutine is very short-lived. If you change the code here to be long live then you'll | ||
// need to find a better scope to launch the coroutine from. | ||
lastLoadJob = GlobalScope.launch(Dispatchers.Main) { |
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.
This is definitely not ideal... The whole view is problematic, which is unfortunately not a new problem. We really shouldn't be having so much heavy logic in a piece of UI...
There's isn't too much else we can do with the current set up...
This will be part of the things we can fix once we move away from the xml views.
# Conflicts: # app/src/main/res/values/ids.xml
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.
Nice
This reverts commit 9919f71.
This reverts commit 9919f71. Co-authored-by: fanchao <[email protected]>
This PR rewrites the
ProfilePictureView
so that it defers the db access to non-UI threads.