Skip to content

Refactor location handling in UploadMediaDetailFragment and related classes #6274

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Sujal-Gupta-SG
Copy link
Contributor

Fixes #6252

  • Copy Title, description and location to subsequent media

  • Show message on success

  • Refresh UI immediately after location update

Refactor location handling in UploadMediaDetailFragment and related classes

Record_2025-04-04-21-55-42.mp4

…#487)

* Copy Title, description and location to subsequent media

* Show message on success

* Refresh UI immediately after location update

Refactor location handling in UploadMediaDetailFragment and related classes
Copy link

github-actions bot commented Apr 4, 2025

✅ Generated APK variants!

@nicolas-raoul
Copy link
Member

Sorry I was no clear in the issue description.

I meant that when a location has been used before, it should be used as a default when opening the "Add location" map.
I believe your branch considers that subsequent pictures have a location, being the one entered previously. That is sometimes not accurate (even though usually not far).

In other words, even if a location has been picked for a previous picture, the following pictures without EXIF coordinates should still have the "Add location" button rather than the "Edit location" button.

If not clear please let me know. Thank you! :-)

@Sujal-Gupta-SG
Copy link
Contributor Author

Sorry I was no clear in the issue description.

I meant that when a location has been used before, it should be used as a default when opening the "Add location" map. I believe your branch considers that subsequent pictures have a location, being the one entered previously. That is sometimes not accurate (even though usually not far).

In other words, even if a location has been picked for a previous picture, the following pictures without EXIF coordinates should still have the "Add location" button rather than the "Edit location" button.

If not clear please let me know. Thank you! :-)

Thank you for the clarification!

Just to share how it currently works: when we add a location to the first image in the selected media set, we then need to manually press the "Copy to subsequent media" button. This action copies the location to all the other selected media files

In above recording I am using fake gps that' why it working like that but you can give a try to my branch so that you get better understanding

I hope you get what I'm saying

@nicolas-raoul
Copy link
Member

nicolas-raoul commented Apr 7, 2025

Copy to subsequent media should copy only captions and descriptions, not location. Copying location would often lead to erroneous locations.

On main, I just tried on main with 3 no-EXIF images:

  1. Fill caption and location for Image 1
  2. Tap Copy to subsequent media
  3. Tap Next
  4. Image2 has the same caption pre-filled, but not the location: the button is Add location.
    So main is correct for this. :-) The only problem is that when I tap Add location, it should show me the map at the location that I had selected for Image1.

@Sujal-Gupta-SG
Copy link
Contributor Author

Sujal-Gupta-SG commented Apr 7, 2025

Copy to subsequent media should copy only captions and descriptions, not location. Copying location would often lead to erroneous locations.

On main, I just tried on main with 3 no-EXIF images:

  1. Fill caption and location for Image 1
  2. Tap Copy to subsequent media
  3. Tap Next
  4. Image2 has the same caption pre-filled, but not the location: the button is Add location.
    So main is correct for this. :-) The only problem is that when I tap Add location, it should show me the map at the location that I had selected for Image1.
Record_2025-04-07-17-27-07.mp4

can you check the above video, if it doesn't satisfy then i try to change but can you give the step what i have to do ?

Is i have to do that after adding the location to first image pin automatically set to that location and when you select the Add location for another image/media it continue from that location

Record_2025-04-07-17-39-18.2.1.mp4

@nicolas-raoul
Copy link
Member

The problem in these videos is that "Copy to subsequent media" also copies the location.

How about remembering the last used location as a kind of preference?

@Sujal-Gupta-SG Sujal-Gupta-SG marked this pull request as draft April 10, 2025 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upload: Remember last selected location
2 participants