Name retained preference write helpers
This commit is contained in:
@@ -624,7 +624,7 @@ void App::dialog_whatsnew(bool force_show)
|
||||
whatsnew->load_url(url, [this, whatsnew, force_show](bool success) {
|
||||
if (success)
|
||||
{
|
||||
int last_id = pp::panopainter::legacy_integer_preference_or("whatsnew-id", 0);
|
||||
int last_id = pp::panopainter::legacy_whatsnew_id_or(0);
|
||||
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));
|
||||
@@ -637,12 +637,12 @@ void App::dialog_whatsnew(bool force_show)
|
||||
whatsnew->reload();
|
||||
});
|
||||
whatsnew->add_button("Read Later", 120, [this, whatsnew](Node*) {
|
||||
pp::panopainter::unset_legacy_preference("whatsnew-id");
|
||||
pp::panopainter::clear_legacy_whatsnew_id();
|
||||
pp::panopainter::save_legacy_preferences();
|
||||
pp::panopainter::close_legacy_dialog_node(*whatsnew);
|
||||
});
|
||||
whatsnew->add_button("Close", 100, [this, whatsnew](Node*) {
|
||||
pp::panopainter::set_legacy_integer_preference("whatsnew-id", whatsnew->m_page_id);
|
||||
pp::panopainter::set_legacy_whatsnew_id(whatsnew->m_page_id);
|
||||
pp::panopainter::save_legacy_preferences();
|
||||
pp::panopainter::close_legacy_dialog_node(*whatsnew);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user