liyamahendra commented on code in PR #1550:
URL: https://github.com/apache/cordova-android/pull/1550#discussion_r1086688760
##########
lib/prepare.js:
##########
@@ -728,17 +731,21 @@ function updateIconResourceForAdaptive (preparedIcons,
resourceMap, platformReso
// project's config.xml location, so we use it as base path.
let background;
let foreground;
+ let monochrome;
let targetPathBackground;
let targetPathForeground;
+ let targetPathMonochrome;
for (const density in android_icons) {
let backgroundVal = '@mipmap/ic_launcher_background';
let foregroundVal = '@mipmap/ic_launcher_foreground';
+ let monochromeVal = '@mipmap/ic_launcher_monochrome';
background = android_icons[density].background;
foreground = android_icons[density].foreground;
+ monochrome = android_icons[density].monochrome;
- if (!background || !foreground) {
+ if (!background || !foreground || !monochrome) {
Review Comment:
How about I refactor this condition as below:
```
if (((monochrome) && (!background || !foreground)) || (!background ||
!foreground)) {
// This icon isn't an adaptive icon, so skip it
continue;
}
```
--
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]