You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2022/09/12 13:12:58 UTC

[GitHub] [cordova-android] breautek commented on a diff in pull request #1490: fix(splash-screen): support navigator.splashscreen.hide w/ AutoHideSplashScreen set to true

breautek commented on code in PR #1490:
URL: https://github.com/apache/cordova-android/pull/1490#discussion_r968401545


##########
framework/src/org/apache/cordova/SplashScreenPlugin.java:
##########
@@ -127,8 +129,11 @@ private void setupSplashScreen(SplashScreen splashScreen) {
 
         // auto hide splash screen when custom delay is defined.
         if (autoHide && delayTime != DEFAULT_DELAY_TIME) {
-            Handler splashScreenDelayHandler = new Handler();
-            splashScreenDelayHandler.postDelayed(() -> keepOnScreen = false, delayTime);
+            Handler delayHandler = new Handler();
+            delayHandler.postDelayed(
+                () -> delayHandlerCondition ? keepOnScreen = false : null,

Review Comment:
   This is causing a build to fail
   
   ```
   /home/runner/work/cordova-android/cordova-android/framework/src/org/apache/cordova/SplashScreenPlugin.java:134: error: incompatible types: lambda body is not compatible with a void functional interface
                   () -> delayHandlerCondition ? keepOnScreen = false : null,
   > Task :CordovaLib:compileDebugJavaWithJavac
   ```
   
   I don't really understand Java's lambda syntax but I think it might be trying to return a value, when it expects a `void` return value.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org