change whatsnew url

This commit is contained in:
2019-11-29 14:55:49 +01:00
parent 4f643146c7
commit 1cba874f2f
3 changed files with 7 additions and 6 deletions

View File

@@ -841,16 +841,17 @@ void App::dialog_export_mp4()
}).detach();
}
void App::dialog_whatsnew()
void App::dialog_whatsnew(bool force_show)
{
auto whatsnew = std::make_shared<NodeRemotePage>();
whatsnew->m_manager = &layout;
whatsnew->init();
whatsnew->load_url("https://panopainter.com/app-content/whatsnew.xml", [this, whatsnew](bool success) {
std::string url = fmt::format("https://panopainter.com/app-content/whatsnew/?version={}", g_version_build);
whatsnew->load_url(url, [this, whatsnew, force_show](bool success) {
if (success)
{
int last_id = Settings::value_or<Serializer::Integer>("whatsnew-id", 0);
if (whatsnew->m_page_id <= g_version_build && whatsnew->m_page_id > last_id)
if ((force_show || whatsnew->m_page_id <= g_version_build) && whatsnew->m_page_id > last_id)
{
whatsnew->set_title(fmt::format("What's new in version {}", g_version_number));
layout[main_id]->add_child(whatsnew);