-
Notifications
You must be signed in to change notification settings - Fork 82
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
thisconnect
wants to merge
14
commits into
BitBoxSwiss:master
from
thisconnect:frontend-android-back
Closed
frontend/android: check if webview can go back or close the app #2701
thisconnect
wants to merge
14
commits into
BitBoxSwiss:master
from
thisconnect:frontend-android-back
Commits on May 16, 2024
-
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.
Configuration menu - View commit details
-
Copy full SHA for 7eeefff - Browse repository at this point
Copy the full SHA 7eeefffView commit details
Commits on May 22, 2024
-
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.
Configuration menu - View commit details
-
Copy full SHA for 623956d - Browse repository at this point
Copy the full SHA 623956dView commit details -
Configuration menu - View commit details
-
Copy full SHA for cbd2b49 - Browse repository at this point
Copy the full SHA cbd2b49View commit details
Commits on May 27, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 8eda74d - Browse repository at this point
Copy the full SHA 8eda74dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1de6a91 - Browse repository at this point
Copy the full SHA 1de6a91View commit details -
Configuration menu - View commit details
-
Copy full SHA for a97386c - Browse repository at this point
Copy the full SHA a97386cView commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 0af4fff - Browse repository at this point
Copy the full SHA 0af4fffView commit details -
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
Configuration menu - View commit details
-
Copy full SHA for 0aba214 - Browse repository at this point
Copy the full SHA 0aba214View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2fee694 - Browse repository at this point
Copy the full SHA 2fee694View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9334a2e - Browse repository at this point
Copy the full SHA 9334a2eView commit details -
trying recommendation from one of the answers from https://stackoverflow.com/questions/8974102/android-blank-screen-on-onback-in-a-loaddatawithbaseurl?noredirect=1&lq=1
Configuration menu - View commit details
-
Copy full SHA for 7a827f2 - Browse repository at this point
Copy the full SHA 7a827f2View commit details -
test to check if loadDataWithBaseURL with shiftcrypto.ch origin might cause history to go back to "https://shiftcrypto.ch/" introduced in 3b62772
Configuration menu - View commit details
-
Copy full SHA for 14e47b1 - Browse repository at this point
Copy the full SHA 14e47b1View commit details -
Configuration menu - View commit details
-
Copy full SHA for ce1f22d - Browse repository at this point
Copy the full SHA ce1f22dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1ef754b - Browse repository at this point
Copy the full SHA 1ef754bView commit details
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.