Skip to content
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

[Capture location task] Prompted to Correct enable location task #2885

Merged

Conversation

anandwana001
Copy link
Collaborator

Copy link

codecov bot commented Nov 29, 2024

Codecov Report

Attention: Patch coverage is 13.63636% with 19 lines in your changes missing coverage. Please review.

Project coverage is 61.19%. Comparing base (20d1540) to head (a18a479).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...tion/tasks/location/CaptureLocationTaskFragment.kt 13.63% 18 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2885      +/-   ##
============================================
- Coverage     61.20%   61.19%   -0.01%     
+ Complexity     1185     1183       -2     
============================================
  Files           267      267              
  Lines          6400     6396       -4     
  Branches        914      914              
============================================
- Hits           3917     3914       -3     
+ Misses         1944     1943       -1     
  Partials        539      539              
Files with missing lines Coverage Δ
...n/tasks/location/CaptureLocationTaskMapFragment.kt 60.00% <ø> (+23.41%) ⬆️
...tion/tasks/location/CaptureLocationTaskFragment.kt 59.61% <13.63%> (-33.72%) ⬇️

Copy link
Member

@shobhitagarwal1612 shobhitagarwal1612 left a comment

Choose a reason for hiding this comment

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

Instead of moving the code to CaptureLocationTaskFragment, can you do something like:


  override fun onResume() {
    super.onResume()
    if (isVisible) {
       // add existing code for showing permission dialog.
    }
  }

@anandwana001
Copy link
Collaborator Author

Instead of moving the code to CaptureLocationTaskFragment, can you do something like:


  override fun onResume() {
    super.onResume()
    if (isVisible) {
       // add existing code for showing permission dialog.
    }
  }

it will not work, because as this fragment is a part of pagination where the code is getting executed when the index is +1.

@shobhitagarwal1612
Copy link
Member

We care about the fragment being visible to the user. Can you try out the above code once?

@anandwana001
Copy link
Collaborator Author

We care about the fragment being visible to the user. Can you try out the above code once?

Tried, not working

@anandwana001 anandwana001 merged commit c982a50 into master Nov 30, 2024
4 checks passed
@anandwana001 anandwana001 deleted the anandwana001/2855/location-dialog-moved-parent-fragment branch November 30, 2024 02:22
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.

[Capture location task] Prompted to enable location on wrong task
4 participants