Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Fix issue to return to setup after viewing terms of use #645

Merged
merged 1 commit into from
Mar 25, 2021

Conversation

jessgusclark
Copy link
Member

@jessgusclark jessgusclark commented Mar 23, 2021

What it fixes

Allows the user to click the back button from the Terms of Use page when initially launching the app.

Reasoning

  • The property onBackButtonPress() is an internal function of the WebViewModal component. Instead, use the onCloseButtonPress() method that is accessible from the props.
  • The internal onBack... method checks if the web component can go back, and if so, it takes the user back a page in the web browser. Perhaps they clicked on the privacy policy and now want to go back to the TOS page.
  • When the user clicks on the 'x' button, it fires the onClose... function, which is the expected behavior.

To test

  • Uninstall the app to clear the RN storage
  • Install, on the tos page, click to "View complete Terms of Use"
  • Click Close
  • Click "View..." again,
  • Click on a link, such as "Privacy Policy", click back button

@jessgusclark jessgusclark changed the title Use onCloseButtonPress() to hide the webview when the user clicks close. Fix issue to return to setup after viewing terms of use Mar 23, 2021
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Contributor

@itofarina itofarina left a comment

Choose a reason for hiding this comment

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

LGTM 👌
Tested on iOS simulator

@patogallaiovlabs patogallaiovlabs merged commit cddbb0e into master Mar 25, 2021
@patogallaiovlabs patogallaiovlabs deleted the tos-back branch March 25, 2021 18:00
@patogallaiovlabs patogallaiovlabs added this to the v1.4.1 milestone Mar 26, 2021
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants