ui: Show news sent with update check on start screen
* News are passed as JSON string, containing an array of news items. * Each news item has version and content (html). * Items can be filtered by min/max version, OS and license. The first item that fits is used. * Items can be important, which highlights the news box. * News are not shown if older than 5 days. fortune cookie message = You will be financially successful in case your actions are well planned.
This commit is contained in:
@@ -597,6 +597,16 @@ Version ApplicationSettings::getUpdateVersion() const
|
||||
return Version::fromString(getValue<std::string>("user/update_check/update_version", "2017.1.0"));
|
||||
}
|
||||
|
||||
std::string ApplicationSettings::getUpdateNews() const
|
||||
{
|
||||
return getValue<std::string>("user/update_check/news", "");
|
||||
}
|
||||
|
||||
void ApplicationSettings::setUpdateNews(const std::string& news)
|
||||
{
|
||||
setValue<std::string>("user/update_check/news", news);
|
||||
}
|
||||
|
||||
void ApplicationSettings::setUpdateVersion(const Version& version)
|
||||
{
|
||||
if (version.isValid())
|
||||
|
||||
@@ -167,6 +167,9 @@ public:
|
||||
Version getUpdateVersion() const;
|
||||
void setUpdateVersion(const Version& version);
|
||||
|
||||
std::string getUpdateNews() const;
|
||||
void setUpdateNews(const std::string& news);
|
||||
|
||||
bool getSeenErrorHelpMessage() const;
|
||||
void setSeenErrorHelpMessage(bool seen);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user