diff --git a/strada/src/main/kotlin/dev/hotwire/strada/BridgeDelegate.kt b/strada/src/main/kotlin/dev/hotwire/strada/BridgeDelegate.kt index 24449db..b275b49 100644 --- a/strada/src/main/kotlin/dev/hotwire/strada/BridgeDelegate.kt +++ b/strada/src/main/kotlin/dev/hotwire/strada/BridgeDelegate.kt @@ -23,11 +23,11 @@ class BridgeDelegate( observeLifeCycle() } - fun loadBridgeInWebView() { + fun onColdBootPageCompleted() { bridge?.load() } - fun resetBridge() { + fun onColdBootPageStarted() { bridge?.reset() } @@ -38,7 +38,7 @@ class BridgeDelegate( if (bridge != null) { if (shouldReloadBridge()) { - loadBridgeInWebView() + bridge?.load() } } else { logEvent("bridgeNotInitializedForWebView", destination.bridgeDestinationLocation()) diff --git a/strada/src/test/kotlin/dev/hotwire/strada/BridgeDelegateTest.kt b/strada/src/test/kotlin/dev/hotwire/strada/BridgeDelegateTest.kt index 5a405ab..8204c8e 100644 --- a/strada/src/test/kotlin/dev/hotwire/strada/BridgeDelegateTest.kt +++ b/strada/src/test/kotlin/dev/hotwire/strada/BridgeDelegateTest.kt @@ -35,14 +35,14 @@ class BridgeDelegateTest { } @Test - fun loadBridgeInWebView() { - delegate.loadBridgeInWebView() + fun onColdBootPageCompleted() { + delegate.onColdBootPageCompleted() verify(bridge).load() } @Test - fun resetBridge() { - delegate.resetBridge() + fun onColdBootPageStarted() { + delegate.onColdBootPageStarted() verify(bridge).reset() }