Skip to content

Commit 965f9e4

Browse files
author
Julian Kast
committed
Add check for secondary Image Field for menuCells
1 parent f0f1693 commit 965f9e4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

base/src/main/java/com/smartdevicelink/managers/screen/menu/BaseMenuManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,7 +1041,7 @@ private AddCommand commandForMenuCell(MenuCell cell, boolean shouldHaveArtwork,
10411041
command.setVrCommands(null);
10421042
}
10431043
command.setCmdIcon((cell.getIcon() != null && shouldHaveArtwork) ? cell.getIcon().getImageRPC() : null);
1044-
command.setSecondaryImage((cell.getSecondaryArtwork() != null && shouldHaveArtwork && !(fileManager.get() != null && fileManager.get().fileNeedsUpload(cell.getSecondaryArtwork()))) ? cell.getSecondaryArtwork().getImageRPC() : null);
1044+
command.setSecondaryImage((cell.getSecondaryArtwork() != null && shouldHaveArtwork && hasImageFieldOfName(ImageFieldName.menuCommandSecondaryImage) && !(fileManager.get() != null && fileManager.get().fileNeedsUpload(cell.getSecondaryArtwork()))) ? cell.getSecondaryArtwork().getImageRPC() : null);
10451045

10461046
return command;
10471047
}
@@ -1065,7 +1065,7 @@ private AddSubMenu subMenuCommandForMenuCell(MenuCell cell, boolean shouldHaveAr
10651065
subMenu.setMenuLayout(menuConfiguration.getSubMenuLayout());
10661066
}
10671067
subMenu.setMenuIcon((shouldHaveArtwork && (cell.getIcon() != null && cell.getIcon().getImageRPC() != null)) ? cell.getIcon().getImageRPC() : null);
1068-
subMenu.setSecondaryImage((shouldHaveArtwork && !(fileManager.get() != null && fileManager.get().fileNeedsUpload(cell.getSecondaryArtwork())) && (cell.getSecondaryArtwork() != null && cell.getSecondaryArtwork().getImageRPC() != null)) ? cell.getSecondaryArtwork().getImageRPC() : null);
1068+
subMenu.setSecondaryImage((shouldHaveArtwork && hasImageFieldOfName(ImageFieldName.menuSubMenuSecondaryImage) && !(fileManager.get() != null && fileManager.get().fileNeedsUpload(cell.getSecondaryArtwork())) && (cell.getSecondaryArtwork() != null && cell.getSecondaryArtwork().getImageRPC() != null)) ? cell.getSecondaryArtwork().getImageRPC() : null);
10691069
return subMenu;
10701070
}
10711071

0 commit comments

Comments
 (0)