Fix crash on rendering card with no header colour

This commit is contained in:
Sylvia van Os
2020-11-17 13:51:44 +01:00
parent ed62ad321b
commit 67b961c672
2 changed files with 11 additions and 0 deletions

View File

@@ -1,5 +1,12 @@
# Changelog
## v1.2.0 (2020-11-17)
Changes:
- Add swiping between groups on the home screen
- Fix crash with cards lacking header colour
## v1.1.0 (2020-11-11)
Changes:

View File

@@ -16,6 +16,10 @@ public class Utils {
int tileLetterFontSize = context.getResources().getDimensionPixelSize(R.dimen.tileLetterFontSize);
int pixelSize = context.getResources().getDimensionPixelSize(R.dimen.cardThumbnailSize);
if (backgroundColor == null) {
backgroundColor = LetterBitmap.getDefaultColor(context, store);
}
return new LetterBitmap(context, store, store,
tileLetterFontSize, pixelSize, pixelSize, backgroundColor, needsDarkForeground(backgroundColor) ? Color.BLACK : Color.WHITE);
}