diff --git a/launcher/config.kcfg b/launcher/config.kcfg index 1483770..0bb1937 100644 --- a/launcher/config.kcfg +++ b/launcher/config.kcfg @@ -12,10 +12,7 @@ SPDX-License-Identifier: CC0-1.0 true - - true - - + true diff --git a/launcher/include/launchercore.h b/launcher/include/launchercore.h index fbab217..60b7539 100755 --- a/launcher/include/launchercore.h +++ b/launcher/include/launchercore.h @@ -59,8 +59,7 @@ class LauncherCore : public QObject Q_PROPERTY(ProfileManager *profileManager READ profileManager CONSTANT) Q_PROPERTY(AccountManager *accountManager READ accountManager CONSTANT) Q_PROPERTY(bool closeWhenLaunched READ closeWhenLaunched WRITE setCloseWhenLaunched NOTIFY closeWhenLaunchedChanged) - Q_PROPERTY(bool showNewsBanners READ showNewsBanners WRITE setShowNewsBanners NOTIFY showNewsBannersChanged) - Q_PROPERTY(bool showNewsList READ showNewsList WRITE setShowNewsList NOTIFY showNewsListChanged) + Q_PROPERTY(bool showNews READ showNews WRITE setShowNews NOTIFY showNewsChanged) Q_PROPERTY(Headline *headline READ headline NOTIFY newsChanged) public: @@ -115,11 +114,8 @@ public: bool closeWhenLaunched() const; void setCloseWhenLaunched(bool value); - bool showNewsBanners() const; - void setShowNewsBanners(bool value); - - bool showNewsList() const; - void setShowNewsList(bool value); + bool showNews() const; + void setShowNews(bool value); int defaultProfileIndex = 0; @@ -147,8 +143,7 @@ signals: void successfulLaunch(); void gameClosed(); void closeWhenLaunchedChanged(); - void showNewsBannersChanged(); - void showNewsListChanged(); + void showNewsChanged(); void loginError(QString message); void stageChanged(QString message); void stageIndeterminate(); diff --git a/launcher/src/launchercore.cpp b/launcher/src/launchercore.cpp index 5849f0e..ea4139f 100755 --- a/launcher/src/launchercore.cpp +++ b/launcher/src/launchercore.cpp @@ -416,31 +416,17 @@ void LauncherCore::setCloseWhenLaunched(const bool value) } } -bool LauncherCore::showNewsBanners() const +bool LauncherCore::showNews() const { - return Config::showNewsBanners(); + return Config::showNews(); } -void LauncherCore::setShowNewsBanners(const bool value) +void LauncherCore::setShowNews(const bool value) { - if (value != Config::showNewsBanners()) { - Config::setShowNewsBanners(value); + if (value != Config::showNews()) { + Config::setShowNews(value); Config::self()->save(); - Q_EMIT showNewsBannersChanged(); - } -} - -bool LauncherCore::showNewsList() const -{ - return Config::showNewsList(); -} - -void LauncherCore::setShowNewsList(const bool value) -{ - if (value != Config::showNewsList()) { - Config::setShowNewsList(value); - Config::self()->save(); - Q_EMIT showNewsListChanged(); + Q_EMIT showNewsChanged(); } }