mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-20 03:37:47 +00:00
Allow loading news items if banner is missing
This commit is contained in:
parent
4214b769df
commit
73150fe8a9
1 changed files with 2 additions and 2 deletions
|
@ -536,7 +536,7 @@ QCoro::Task<> LauncherCore::fetchNews()
|
||||||
const auto bannerDocument = QJsonDocument::fromJson(bannerReply->readAll());
|
const auto bannerDocument = QJsonDocument::fromJson(bannerReply->readAll());
|
||||||
|
|
||||||
const auto headline = new Headline(this);
|
const auto headline = new Headline(this);
|
||||||
if (document.isEmpty() || bannerDocument.isEmpty()) {
|
if (document.isEmpty() && bannerDocument.isEmpty()) {
|
||||||
headline->failedToLoad = true;
|
headline->failedToLoad = true;
|
||||||
} else {
|
} else {
|
||||||
const auto parseNews = [](QJsonObject object) -> News {
|
const auto parseNews = [](QJsonObject object) -> News {
|
||||||
|
@ -678,4 +678,4 @@ void LauncherCore::uninhibitSleep()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "moc_launchercore.cpp"
|
#include "moc_launchercore.cpp"
|
||||||
|
|
Loading…
Add table
Reference in a new issue