-
Notifications
You must be signed in to change notification settings - Fork 782
Fix crashes #8410
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 crashes #8410
Conversation
if (positionOfReadMarker == null) { | ||
false | ||
withResumed { | ||
viewLifecycleOwner.lifecycleScope.launch { |
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.
Is it expected to have this line twice?
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.
it seems since this is done at several places
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.
Yes, we are not in a coroutine scope in the withResumed
block.
SonarCloud Quality Gate failed. |
@@ -81,9 +79,7 @@ class LocationPreviewFragment : | |||
views.mapView.onCreate(savedInstanceState) | |||
|
|||
viewLifecycleOwner.lifecycleScope.launch { | |||
viewLifecycleOwner.repeatOnLifecycle(Lifecycle.State.CREATED) { |
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.
I don't know if this code was here for a certain reason, but I agree that it does not seem necessary since we're in the onViewCreated
method
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.
Changes LGTM, not tested
Type of change
Content
repeatOnLifecycle
was not used properly. This PR does some cleanup.Reviewer: please ignore spaces when comparing.
Motivation and context
Fixes #8409
Screenshots / GIFs
Tests
Tested devices
Checklist