core: Add a periodic donation request (#8981)
Will fire once in december and july. Disableable with `ecosystem:no_donation:nag`
This commit is contained in:
parent
da9252a23e
commit
b5fb6110ab
10 changed files with 278 additions and 115 deletions
|
|
@ -1,17 +1,18 @@
|
|||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
||||
class CVersionKeeperManager {
|
||||
public:
|
||||
CVersionKeeperManager();
|
||||
|
||||
// whether the update screen was shown this boot.
|
||||
bool fired();
|
||||
|
||||
private:
|
||||
std::optional<std::string> getDataHome();
|
||||
std::optional<std::string> getDataLastVersion(const std::string& dataRoot);
|
||||
void writeVersionToVersionFile(const std::string& dataRoot);
|
||||
bool isVersionOlderThanRunning(const std::string& ver);
|
||||
bool isVersionOlderThanRunning(const std::string& ver);
|
||||
|
||||
bool m_bFired = false;
|
||||
};
|
||||
|
||||
inline std::unique_ptr<CVersionKeeperManager> g_pVersionKeeperMgr;
|
||||
Loading…
Add table
Add a link
Reference in a new issue