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: check if webview can go back or close the app #2701

Closed

Commits on May 16, 2024

  1. 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 history or closing the app.
    
    In theory the react-router pushes history entries to the webview
    navigation history, as soon as the user clicks a Link or navigate
    is called. The navigate function can also be called with replace
    option so that it does not add to the history.
    
    This is using the native goBack method but it seems that the app
    only goes back to account summary. In theory this should behave
    the same as native browser back. It is not clear why it jumps to
    the beginning.
    
    So this could probably be improved, but seems already useful with
    just going back to the account 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 16, 2024
    Configuration menu
    Copy the full SHA
    7eeefff View commit details
    Browse the repository at this point in the history

Commits on May 22, 2024

  1. frontend/android: load data with baseurl

    The previous commit added a condition webview.canGoBack() and then
    uses goBack() if the webview can go back in history.
    
    This does not behave the same as native browser back in webdev.
    
    The webview loads with loadDataWithBaseURL, where the 4th argument
    is historyUrl which is null. Introduced in: 3b62772
    
    This commit uses same base url to initialize historyUrl.
    thisconnect committed May 22, 2024
    Configuration menu
    Copy the full SHA
    623956d View commit details
    Browse the repository at this point in the history
  2. frontend: debug popstate

    thisconnect committed May 22, 2024
    Configuration menu
    Copy the full SHA
    cbd2b49 View commit details
    Browse the repository at this point in the history

Commits on May 27, 2024

  1. debug proxy history push

    thisconnect committed May 27, 2024
    Configuration menu
    Copy the full SHA
    8eda74d View commit details
    Browse the repository at this point in the history
  2. use gobackforward -1

    thisconnect committed May 27, 2024
    Configuration menu
    Copy the full SHA
    1de6a91 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a97386c View commit details
    Browse the repository at this point in the history
  4. frontend: push all messages to active alert component

    Alert component exposes a function to be called from anywhere.
    
    This is a bit a hack and if called multiple times, last alerts
    are lost.
    
    Changed to check if alert is already active and append new messages
    to the same alert.
    thisconnect committed May 27, 2024
    Configuration menu
    Copy the full SHA
    0af4fff View commit details
    Browse the repository at this point in the history
  5. blind guess

    seems sd there can be similar issues when using history back from
    a webview that was loaded by loadDataWithBaseURL.
    
    This is wild guess
    
    https://stackoverflow.com/questions/3574674/android-webviews-method-goback-shows-a-blank-page
    thisconnect committed May 27, 2024
    Configuration menu
    Copy the full SHA
    0aba214 View commit details
    Browse the repository at this point in the history
  6. show full uri

    thisconnect committed May 27, 2024
    Configuration menu
    Copy the full SHA
    2fee694 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    9334a2e View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    7a827f2 View commit details
    Browse the repository at this point in the history
  9. try with loadurl

    test to check if loadDataWithBaseURL with shiftcrypto.ch origin might
    cause history to go back to "https://shiftcrypto.ch/"
    introduced in 3b62772
    thisconnect committed May 27, 2024
    Configuration menu
    Copy the full SHA
    14e47b1 View commit details
    Browse the repository at this point in the history
  10. without pushstate proxy

    thisconnect committed May 27, 2024
    Configuration menu
    Copy the full SHA
    ce1f22d View commit details
    Browse the repository at this point in the history
  11. without popstate debug

    thisconnect committed May 27, 2024
    Configuration menu
    Copy the full SHA
    1ef754b View commit details
    Browse the repository at this point in the history