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

Frontend android back hashrouter #2705

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on May 8, 2024

  1. frontend: replace BrowserRouter with HashRouter

    Using the BrowserRouter is needlessly complicated, we don't need the
    browser to make a new "request" when we route to a different
    page. Getting this to work is especially difficult in iOS, where the
    file path to index.html is loaded in the webview, and routing to
    e.g. `/account-summary' fails because the absolute filepath
    `/account-summary` does not exist and is outside the app folder
    sandbox.
    
    Using the hash router instead, where the app path is tracked behind
    the `#` (e.g. index.html#/account-summary) is more appropriate and
    easier to handle.
    benma authored and thisconnect committed May 8, 2024
    Configuration menu
    Copy the full SHA
    4e4b037 View commit details
    Browse the repository at this point in the history
  2. frontend/android: check if webview can go back or close the app

    This should replace native Android back behavior with either going
    back in the webview or closing the app.
    
    This is using the native goBack method but it seems that the app
    only goes back to account summary. This could probably be improved
    later and seems already useful with just going back to summary.
    
    On the account summary it cannot go back any further so it will
    trigger the old do-you-want-to-quit alert.
    
    Replaced deprecated onBackPressed override.
    thisconnect committed May 8, 2024
    Configuration menu
    Copy the full SHA
    7925b04 View commit details
    Browse the repository at this point in the history