Skip to content

Fixes #3732 Achievements: redirecting to the proper fragment #3805

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

Closed
wants to merge 1 commit into from

Conversation

Anyrob
Copy link

@Anyrob Anyrob commented Jun 16, 2020

Description
According to the location permission, it redirects from Nearby to Contribution Fragment is not granted.

Achievements: redirecting to the proper fragment.

Fixes #3732

What changes did you make and why?
Added a new function to check which fragment to use according to the location permission.

Copy link

@tests-checker tests-checker bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add tests to make sure this change works as expected?

@codecov-commenter
Copy link

Codecov Report

Merging #3805 into master will decrease coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##             master   #3805      +/-   ##
===========================================
- Coverage      8.50%   8.50%   -0.01%     
  Complexity      366     366              
===========================================
  Files           309     309              
  Lines         12428   12433       +5     
  Branches        994     995       +1     
===========================================
  Hits           1057    1057              
- Misses        11302   11307       +5     
  Partials         69      69              
Impacted Files Coverage Δ Complexity Δ
...r/free/nrw/commons/contributions/MainActivity.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b7ba1f0...f653ab6. Read the comment docs.

@luislizarraga
Copy link

Do you have any screenshots or a gif showing the redirect?

@Anyrob
Copy link
Author

Anyrob commented Jun 16, 2020

Here's a gif showing that the map is not displayed, due to not allowing the access location.
ezgif com-video-to-gif

@luislizarraga
Copy link

Thank you! Looks good :D

@luislizarraga
Copy link

Is there a way to add tests?

@Anyrob
Copy link
Author

Anyrob commented Jun 25, 2020

Hi @luislizarraga, Sure, I am currently working on it but as the first time writing a test on Android is taking me a little bit, however, at the moment I feel I have the basics, but I'm reading about it to keep trying!
I'm going to try to get it ready this week, anything I keep you up to date :)

@neslihanturan
Copy link
Collaborator

Thanks a lot @Anyrob . Great job! But after #3891 will be merged, I think this changes will be irrelevant with the code base, unfortunately :(

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.

Nearby Tab Accessible Without Location Permission
4 participants