apps-android-commons icon indicating copy to clipboard operation
apps-android-commons copied to clipboard

[Bug]: App prompts for user location in Explore's uploaded via mobile screen

Open sivaraam opened this issue 1 year ago • 9 comments

Summary

The app seems to be prompting for user location in the Explore's "Uploaded via mobile" screen. This is incorrect as that screen doesn't need location permission at all.

Steps to reproduce

  1. Freshly install the app
  2. Open Explore
  3. Tap on the "Uploaded via mobile" tab

Expected behaviour

The app shows images in "Uploaded via mobile" screen without any prompt.

Actual behaviour

The app requests for location permission. The same is necessary only for the "Map" screen of Explore. So, prompt being show in "Uploaded via mobile" screen is incorrect.

Device name

OnePlus Nord

Android version

Android 12

Commons app version

main branch

Device logs

No response

Screen-shots

Screencast: https://drive.google.com/file/d/1_RTNcnU7ludiNFEmd2ZeDMcDcdQ8zZCZ/view?usp=sharing

Would you like to work on the issue?

None

sivaraam avatar Feb 15 '24 04:02 sivaraam

Isn't this activity centered around the user, though?

I sometimes use this activity to see whether the area I am in in already well covered, or has some gaps in coverage.

nicolas-raoul avatar Feb 15 '24 08:02 nicolas-raoul

@sivaraam I can reproduce this issue on main branch as well, so could you update the description of this issue to display "Commons version" as main, this will help others to directly use the main branch to work on this issue :)

ShashwatKedia avatar Feb 15 '24 12:02 ShashwatKedia

Isn't this activity centered around the user, though?

I sometimes use this activity to see whether the area I am in in already well covered, or has some gaps in coverage.

I think the "Map" tab is user centric, and you would use that tab to see whether the are you are in is well covered or not. But what Sivaraam wants to say here is that, even without opening the "Map" tab and just opening the "Uploaded via mobile" tab prompts for location permission, which it shouldn't do, as it doesn't require that permission to display the images :-)

ShashwatKedia avatar Feb 15 '24 12:02 ShashwatKedia

Ah yes I totally misread the issue, sorry for the noise!

nicolas-raoul avatar Feb 15 '24 12:02 nicolas-raoul

@sivaraam I can reproduce this issue on main branch as well, so could you update the description of this issue to display "Commons version" as main, this will help others to directly use the main branch to work on this issue :)

Tweaked the description. Thanks for the info 🙂

sivaraam avatar Feb 15 '24 13:02 sivaraam

@sivaraam This is similar to issue #5551 , we can club both of these issues together (update the description of this issue to address both) so that I can close #5551, I was just working on exploring so I think I got the idea of what is causing both of these issues (there might be others too), so I think it will be better if we can handle all of these at once.

@nicolas-raoul If clubbing both these issues in this one sounds good then can you assign this to me? as this task can get a bit complex

shashankiitbhu avatar Feb 15 '24 14:02 shashankiitbhu

@sivaraam This is similar to issue #5551 , we can club both of these issues together (update the description of this issue to address both) so that I can close #5551, I was just working on exploring so I think I got the idea of what is causing both of these issues (there might be others too), so I think it will be better if we can handle all of these at once.

Actually, both of these issues are being caused because of the same reason, as correctly pointed out by Sivaraam here, which is that Android is initializing the 'Map' tab automatically, in anticipation that user might switch to it soon. So, even further issues related to this will have been caused by the same reason.

@nicolas-raoul If clubbing both these issues in this one sounds good then can you assign this to me? as this task can get a bit complex

I would suggest you should wait for #5494 to be merged because it brings significant changes to the flow and code of all the fragments which use maps. Otherwise, you will have to rewrite the code as there will be merge conflicts :)

ShashwatKedia avatar Feb 15 '24 15:02 ShashwatKedia

@ShashwatKedia I do understand the reason as I have worked recently on this, we can always handle merge conflicts so I don't think that is an issue , I am good with what @nicolas-raoul , @sivaraam suggests here. waiting is not an issue too, and @ShashwatKedia let me know if you need help anywhere here so that it can merged sooner , let this not be a block for too long, thanks

shashankiitbhu avatar Feb 15 '24 20:02 shashankiitbhu

@sivaraam This is similar to issue #5551 , we can club both of these issues together (update the description of this issue to address both) so that I can close #5551

As per Shashwat's linked comment, I think it's already clear that one part is handled by hisPR/#5494. The other part is already captured in this issue. So, I'm not sure why the description needs an edit. Let me know if I missed something.

Also, could you give that PR #5494 a try and see if it indeed fixes the issue for you. If so, we could close the other issue. Otherwise, we may need to explore the root cause of the behaviour that you observe.

sivaraam avatar Feb 20 '24 03:02 sivaraam

Hey @nicolas-raoul I am intrested and i would like to work on this issue , Can you assign this issue to me :) ?

Kota-Jagadeesh avatar May 30 '25 12:05 Kota-Jagadeesh

Can you give me the update on my PR ? @nicolas-raoul

Kota-Jagadeesh avatar Jun 05 '25 12:06 Kota-Jagadeesh

I will try to test tomorrow. Thank you for your patience!

nicolas-raoul avatar Jun 05 '25 12:06 nicolas-raoul

@nicolas-raoul Made a PR which solves this issue, Can you check it out : )

Kota-Jagadeesh avatar Sep 18 '25 20:09 Kota-Jagadeesh