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.
25 lines
No EOL
481 B
C++
25 lines
No EOL
481 B
C++
#pragma once
|
|
|
|
#include "../helpers/memory/Memory.hpp"
|
|
|
|
class CDonationNagManager {
|
|
public:
|
|
CDonationNagManager();
|
|
|
|
// whether the donation nag was shown this boot.
|
|
bool fired();
|
|
|
|
private:
|
|
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; |