From 54c89104de0fca8d2e1df411bfb53d5c09a5fc5e Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Wed, 30 Apr 2025 14:47:35 +0200 Subject: DonationNag: ask after each major update (#10213) This changes how the donation nag timing works. The donation nag will now appear: - after a major update (e.g. 48 -> 49)* - once in late july - once in december however, a donation nag will never pop up more than once a month. So, if there is an update on the 26th of November, and you get a popup on the 28th, you will not get one in december. This is of course still disableable in your config. --- src/managers/DonationNagManager.hpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/managers/DonationNagManager.hpp') diff --git a/src/managers/DonationNagManager.hpp b/src/managers/DonationNagManager.hpp index 357f979f..ce6015de 100644 --- a/src/managers/DonationNagManager.hpp +++ b/src/managers/DonationNagManager.hpp @@ -10,7 +10,16 @@ class CDonationNagManager { bool fired(); private: - bool m_bFired = false; + struct SStateData { + uint64_t epoch = 0; + uint64_t major = 0; + }; + + SStateData getState(); + void writeState(const SStateData& s); + void fire(); + + bool m_bFired = false; }; inline UP g_pDonationNagManager; \ No newline at end of file -- cgit v1.2.3