Fix: Fix crash when adding location after removing a picture#6175
Merged
nicolas-raoul merged 4 commits intocommons-app:mainfrom Feb 7, 2025
Merged
Fix: Fix crash when adding location after removing a picture#6175nicolas-raoul merged 4 commits intocommons-app:mainfrom
nicolas-raoul merged 4 commits intocommons-app:mainfrom
Conversation
nicolas-raoul
approved these changes
Feb 7, 2025
Member
nicolas-raoul
left a comment
There was a problem hiding this comment.
Solves the crash, thanks!
nicolas-raoul
added a commit
that referenced
this pull request
Feb 26, 2025
* Fix: Resolved the Crash in UploadMediaDetailFragment * Fix uninitialized basicKvStoreFactory in UploadMediaPresenter --------- Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
sonalyadav1
added a commit
to sonalyadav1/apps-android-commons
that referenced
this pull request
May 22, 2025
…-app#6175) * Fix: Resolved the Crash in UploadMediaDetailFragment * Fix uninitialized basicKvStoreFactory in UploadMediaPresenter --------- Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
**Description **
This PR fixes a crash that occurs when a user tries to add a location after removing a picture. The crash happens because the ActivityResultLauncher for the LocationPickerActivity is not properly registered before being used.
Fixes #6171
Solution
Added a lateinit var startForResult: ActivityResultLauncher to declare the launcher.
Registered the ActivityResultLauncher in the onCreate method of the fragment.
Ensured the launcher is properly initialized before being used in goToLocationPickerActivity.
Tests performed (required)
Tested {BetaDebugUnit} on {Vivo V25} with API level {34}.
video_20250205_010501_edit.copy.mp4