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/11 14:29:34 UTC

[GitHub] [cordova-android] jcesarmobile commented on a diff in pull request #1487: fix: Add android prefix to windowSplashScreenBrandingImage

jcesarmobile commented on code in PR #1487:
URL: https://github.com/apache/cordova-android/pull/1487#discussion_r967837939


##########
lib/prepare.js:
##########
@@ -378,14 +378,18 @@ function updateProjectSplashScreen (platformConfig, locations) {
         'windowSplashScreenAnimatedIcon',
         'windowSplashScreenAnimationDuration',
         'windowSplashScreenBackground',
-        'windowSplashScreenBrandingImage',
+        'android:windowSplashScreenBrandingImage',
         'windowSplashScreenIconBackgroundColor',
         'postSplashScreenTheme'
     ].forEach(themeKey => {
-        const cdvConfigPrefKey = 'Android' + themeKey.charAt(0).toUpperCase() + themeKey.slice(1);
+        let index = 0;
+        if (themeKey.indexOf(':') !== -1) {
+            index = themeKey.indexOf(':') + 1;
+        }
+        const cdvConfigPrefKey = 'Android' + themeKey.charAt(index).toUpperCase() + themeKey.slice(index + 1);

Review Comment:
   I have removed the if as it's not really necessary, so the code is simpler now, let me know if you still prefer to use the replace.



-- 
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