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


##########
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:
   With this suggested change however I think for users running on API 33, if 
they use adaptive icons but with no monochrome icon provided, the icon will end 
up using the cordova default if the device has themed icons enabled.
   
   Which might be undesirable...
   
   I guess with what you have now, it will fallback to to the legacy/standard 
icon (e..g `<icon src="..." />`)?
   
   Maybe before you implement the suggestion, tell me your thoughts.



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

Reply via email to