Skip to content

Commit d1903da

Browse files
authored
ensure loading bar disappears on page finished (#188)
1 parent 311e577 commit d1903da

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

platforms/android/lib/src/main/java/com/shopify/checkoutkit/EmbeddedCheckoutProtocol.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ internal class EmbeddedCheckoutProtocol(
111111
)
112112

113113
private fun handleStart(message: String) {
114-
log.d(LOG_TAG, "Handling $METHOD_START: showing progress bar and bubbling up.")
114+
log.d(LOG_TAG, "Handling $METHOD_START: hiding progress bar and bubbling up.")
115115
onMainThread {
116-
view.getListener().onCheckoutViewLoadStarted()
116+
view.getListener().onCheckoutViewLoadComplete()
117117
client?.process(message)
118118
}
119119
}

platforms/android/lib/src/test/java/com/shopify/checkoutkit/EmbeddedCheckoutProtocolTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,10 +338,10 @@ class EmbeddedCheckoutProtocolTest {
338338
// region ec.start
339339

340340
@Test
341-
fun `ec start shows progress bar`() {
341+
fun `ec start hides progress bar`() {
342342
ecp.postMessage("""{"jsonrpc":"2.0","method":"ec.start","params":{"checkout":{}}}""")
343343
shadowOf(Looper.getMainLooper()).runToEndOfTasks()
344-
verify(mockListener).onCheckoutViewLoadStarted()
344+
verify(mockListener).onCheckoutViewLoadComplete()
345345
}
346346

347347
@Test

0 commit comments

Comments
 (0)