Try smaller icons if 256px not available

This commit is contained in:
Râu Cao 2023-11-18 17:35:57 +01:00
parent 721dccb499
commit f451adcb53
Signed by: raucao
GPG Key ID: 15E65F399D084BA9

View File

@ -18,9 +18,12 @@ module AppCatalogManager
@app.metadata[prop] = metadata.send(prop) if prop @app.metadata[prop] = metadata.send(prop) if prop
end end
if icon = metadata.select_icon(sizes: "256x256") if icon = metadata.select_icon(sizes: "256x256") ||
icon = metadata.select_icon(sizes: "192x192")
attach_remote_image(:icon, icon) attach_remote_image(:icon, icon)
# TODO elsif get whatever is available
end end
if apple_touch_icon = metadata.select_icon(purpose: "apple-touch-icon") if apple_touch_icon = metadata.select_icon(purpose: "apple-touch-icon")
attach_remote_image(:apple_touch_icon, apple_touch_icon) attach_remote_image(:apple_touch_icon, apple_touch_icon)
end end