erisu commented on code in PR #1487:
URL: https://github.com/apache/cordova-android/pull/1487#discussion_r967759668
##########
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:
Not sure if this is better performance or eaiser to read, but what about
this?
```js
const themeKeyDescoped = themeKey.replace('android:', '');
const cdvConfigPrefKey = 'Android' +
themeKeyDescoped.charAt(0).toUpperCase() + themeKeyDescoped.slice(1);
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]