mirror of
https://github.com/logseq/logseq.git
synced 2026-05-24 04:34:14 +00:00
fix(android): finish activity at native root back
Agent-Logs-Url: https://github.com/logseq/logseq/sessions/8607ea41-e86e-4901-bc85-cb886e184f1d Co-authored-by: xyhp915 <1779837+xyhp915@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
201305ceeb
commit
3a21c8bc7f
@@ -228,15 +228,17 @@ public class MainActivity extends BridgeActivity {
|
||||
WebView webView = getBridge().getWebView();
|
||||
if (webView != null) {
|
||||
NavigationRenderState nativePopState = navigationCoordinator.prepareNativePop();
|
||||
if (nativePopState != null) {
|
||||
Log.d(
|
||||
"NavStack",
|
||||
NAV_STACK_DEBUG_PREFIX + " activity.nativeBack consumed=native-stack-pop target="
|
||||
+ nativePopState.getPath()
|
||||
+ " paths=" + nativePopState.getPaths()
|
||||
);
|
||||
ComposeHost.applyNavigation(nativePopState);
|
||||
if (nativePopState == null) {
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
Log.d(
|
||||
"NavStack",
|
||||
NAV_STACK_DEBUG_PREFIX + " activity.nativeBack consumed=native-stack-pop target="
|
||||
+ nativePopState.getPath()
|
||||
+ " paths=" + nativePopState.getPaths()
|
||||
);
|
||||
ComposeHost.applyNavigation(nativePopState);
|
||||
// Send "native back" into JS. JS will call your UILocal/route-change,
|
||||
// which flows into ComposeHost.applyNavigation(...) and animates.
|
||||
sendJsBack(webView);
|
||||
|
||||
Reference in New Issue
Block a user