Fixed Neighborhood Complete Screen Rendering Early #3690
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.
Resolves #3680
In this PR, I added some logic to see if we were on the very last un-audited street in a neighborhood, and made sure to show the neighborhood complete screen after that street finishes. I also added logic to delay the display of that overlay to the point where the user jumps to a new street after completing a neighborhood. This necessitated a number of small changes in TaskContainer & MapService, including the addition of a new flag field (to log the fact that we need to display the overlay) that is toggled on when the neighborhood is finished, and turned back off when the overlay is displayed.
Since the code for what jumps happen after a neighborhood is finished is pretty complex & there are a number of different methods that could handle it on a case-by case basis, I made sure to call the new function that conditionally renders the overlay in a few different places so we don't miss out on a case where a neighborhood is complete and the overlay needs to be rendered.
Also, in order to do this, I had to make it so that the old function that was in charge of rendering the overlay is not used anymore, but as of now I left the code in there just because I'm a little iffy on deleting it without a review!
Testing instructions
Things to check before submitting the PR