diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2025-04-30 14:47:35 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-30 14:47:35 +0200 |
| commit | 54c89104de0fca8d2e1df411bfb53d5c09a5fc5e (patch) | |
| tree | f596e3b42276db5ea0bc99ceb6cf2026312eeadd /src/managers/DonationNagManager.hpp | |
| parent | b2ad21a65c9801012cdb4cb49a94257c0e44adf6 (diff) | |
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.
Diffstat (limited to 'src/managers/DonationNagManager.hpp')
| -rw-r--r-- | src/managers/DonationNagManager.hpp | 11 |
1 files changed, 10 insertions, 1 deletions
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<CDonationNagManager> g_pDonationNagManager;
\ No newline at end of file |
