fix: use placeholder icon when the project has no icon in MR

Projects with no icon return a null icon URL in Modrinth's API.

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow 2022-09-23 18:05:58 -03:00
parent 3df8594f19
commit e7380e70a3
No known key found for this signature in database
GPG Key ID: 8D0F221F0A59F469
2 changed files with 2 additions and 2 deletions

View File

@ -171,7 +171,7 @@ void ListModel::getLogo(const QString& logo, const QString& logoUrl, LogoCallbac
void ListModel::requestLogo(QString logo, QString url) void ListModel::requestLogo(QString logo, QString url)
{ {
if (m_loadingLogos.contains(logo) || m_failedLogos.contains(logo)) { if (m_loadingLogos.contains(logo) || m_failedLogos.contains(logo) || url.isEmpty()) {
return; return;
} }

View File

@ -227,7 +227,7 @@ void ModpackListModel::getLogo(const QString& logo, const QString& logoUrl, Logo
void ModpackListModel::requestLogo(QString logo, QString url) void ModpackListModel::requestLogo(QString logo, QString url)
{ {
if (m_loadingLogos.contains(logo) || m_failedLogos.contains(logo)) { if (m_loadingLogos.contains(logo) || m_failedLogos.contains(logo) || url.isEmpty()) {
return; return;
} }