-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Add android prefix to windowSplashScreenBrandingImage #1487
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1487 +/- ##
==========================================
- Coverage 72.25% 72.13% -0.13%
==========================================
Files 21 21
Lines 1748 1751 +3
==========================================
Hits 1263 1263
- Misses 485 488 +3
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we also need to add tools:targetApi="31"
to the node that gets created for this one property.
I remember having issues without this.
lib/prepare.js
Outdated
let index = 0; | ||
if (themeKey.indexOf(':') !== -1) { | ||
index = themeKey.indexOf(':') + 1; | ||
} | ||
const cdvConfigPrefKey = 'Android' + themeKey.charAt(index).toUpperCase() + themeKey.slice(index + 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is better performance or eaiser to read, but what about this?
const themeKeyDescoped = themeKey.replace('android:', '');
const cdvConfigPrefKey = 'Android' + themeKeyDescoped.charAt(0).toUpperCase() + themeKeyDescoped.slice(1);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What you have is good. Dont need to use replace.
Added the targetApi 31 thing, also required to add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM
It's been a while; is there any chance we can get this released? 🙏 |
closes #1475
windowSplashScreenBrandingImage
is not valid, it should beandroid:windowSplashScreenBrandingImage
.All other values should also include the
android:
, but the support library allows to use them without theandroid:
part, but sincewindowSplashScreenBrandingImage
is not supported by the support library apps fail to compile.This PR adds the
android:
prefix to the value so it gets added to the styles file with the prefix.Needed to patch how the cdvConfigPrefKey is generated to strip the android: part of the themeKey