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.
This commit is contained in:
Vaxry 2025-04-30 14:47:35 +02:00 committed by GitHub
parent b2ad21a65c
commit 54c89104de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 78 additions and 25 deletions

View file

@ -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;