From 28a0e426745cd9124a96863a0b7c0c8210f00f4c Mon Sep 17 00:00:00 2001 From: Sergio Milici Date: Mon, 29 Jun 2020 12:59:40 -0300 Subject: [PATCH] fix(SplashScreen): show method not resolving if autoHide is false (#3144) --- android/capacitor/src/main/java/com/getcapacitor/Splash.java | 5 +++++ ios/Capacitor/Capacitor/Plugins/SplashScreen.swift | 2 ++ 2 files changed, 7 insertions(+) diff --git a/android/capacitor/src/main/java/com/getcapacitor/Splash.java b/android/capacitor/src/main/java/com/getcapacitor/Splash.java index 4fca9d3b6..480638b73 100644 --- a/android/capacitor/src/main/java/com/getcapacitor/Splash.java +++ b/android/capacitor/src/main/java/com/getcapacitor/Splash.java @@ -243,6 +243,11 @@ public void run() { } } }, showDuration); + } else { + // If no autoHide, call complete + if (splashListener != null) { + splashListener.completed(); + } } } diff --git a/ios/Capacitor/Capacitor/Plugins/SplashScreen.swift b/ios/Capacitor/Capacitor/Plugins/SplashScreen.swift index 60894104d..b0e5e8012 100644 --- a/ios/Capacitor/Capacitor/Plugins/SplashScreen.swift +++ b/ios/Capacitor/Capacitor/Plugins/SplashScreen.swift @@ -183,6 +183,8 @@ public class CAPSplashScreenPlugin: CAPPlugin { self.hideSplash(fadeOutDuration: fadeOutDuration, isLaunchSplash: isLaunchSplash) completion() } + } else { + completion() } } }