diff options
author | Heiko Tietze <tietze.heiko@gmail.com> | 2021-10-07 11:13:49 +0200 |
---|---|---|
committer | Heiko Tietze <heiko.tietze@documentfoundation.org> | 2021-10-07 13:46:19 +0200 |
commit | 1b6b2eff9ac386fd994e3ae120882f646268a80b (patch) | |
tree | ce08951917afdbed23da81d2d0fb94aae3978f09 /cui | |
parent | 961ebbe9ebd9becdefdeaa5fdea63cb0e7d27443 (diff) |
Resolves tdf#144693 - TipOfTheDay does not progress
Follow-up to I94cd34aa031e133d8c229a0de78582fda1dbdf4a
Change-Id: I29a91a188fb9783074491271c37b49a1f2cf13ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123206
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/tipofthedaydlg.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cui/source/dialogs/tipofthedaydlg.cxx b/cui/source/dialogs/tipofthedaydlg.cxx index ed528d3042de..34193bff90de 100644 --- a/cui/source/dialogs/tipofthedaydlg.cxx +++ b/cui/source/dialogs/tipofthedaydlg.cxx @@ -74,6 +74,9 @@ TipOfTheDayDialog::TipOfTheDayDialog(weld::Window* pParent) const auto t0 = std::chrono::system_clock::now().time_since_epoch(); sal_Int32 nDay = std::chrono::duration_cast<std::chrono::hours>(t0).count() / 24; + //show next tip after one day + if (nDay > officecfg::Office::Common::Misc::LastTipOfTheDayShown::get()) + m_nCurrentTip++; // save this time to the config now instead of in the dtor otherwise we // end up with multiple copies of this dialog every time we open a new @@ -83,9 +86,6 @@ TipOfTheDayDialog::TipOfTheDayDialog(weld::Window* pParent) officecfg::Office::Common::Misc::LastTipOfTheDayShown::set(nDay, xChanges); xChanges->commit(); - if (nDay > officecfg::Office::Common::Misc::LastTipOfTheDayShown::get()) - m_nCurrentTip++; - UpdateTip(); } |