fix(memberListActivities): prefer large image

I found the large image to be more applicable most of the time as the small image is often only used as an indicator.

Maybe make this a setting?

I also thought about maintaining a list of applications where to use which image but gave up on that idea.
This commit is contained in:
D3SOX 2024-02-16 09:31:33 +01:00
parent 96c1d9cb4b
commit 004517ce9b
No known key found for this signature in database
GPG key ID: 39EC1673FC37B048

View file

@ -140,17 +140,16 @@ export default definePlugin({
} }
}; };
// Prefer small image // Prefer large image
const smallImage = assets.small_image;
if (smallImage) {
addImage(smallImage, assets.small_text ?? "Small Text");
} else {
const largeImage = assets.large_image; const largeImage = assets.large_image;
if (largeImage) { if (largeImage) {
addImage(largeImage, assets.large_text ?? "Large Text"); addImage(largeImage, assets.large_text ?? "Large Text");
} else {
const smallImage = assets.small_image;
if (smallImage) {
addImage(smallImage, assets.small_text ?? "Small Text");
} }
} }
} else { } else {
let application = ApplicationStore.getApplication(application_id); let application = ApplicationStore.getApplication(application_id);
if (!application) { if (!application) {