1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-20 11:47:46 +00:00

Fill out headline URLs when they are mysteriously missing

This commit is contained in:
Joshua Goins 2022-03-10 10:05:10 -05:00
parent 48b7e8a5a8
commit 01214464cb

View file

@ -42,7 +42,12 @@ void getHeadline(LauncherCore& core, std::function<void(Headline)> return_func)
news.id = object["id"].toString(); news.id = object["id"].toString();
news.tag = object["tag"].toString(); news.tag = object["tag"].toString();
news.title = object["title"].toString(); news.title = object["title"].toString();
news.url = QUrl(object["url"].toString());
if(object["url"].toString().isEmpty()) {
news.url = QUrl(QString("https://na.finalfantasyxiv.com/lodestone/news/detail/%1").arg(news.id));
} else {
news.url = QUrl(object["url"].toString());
}
return news; return news;
}; };