mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 02:36:19 +02:00
runner: initial automatic update (#2141)
This commit is contained in:
@@ -2,11 +2,16 @@
|
||||
|
||||
#include <ctime>
|
||||
#include <optional>
|
||||
#include <functional>
|
||||
|
||||
// All fields must be default-initialized
|
||||
struct UpdateState
|
||||
{
|
||||
std::optional<std::time_t> github_update_last_checked_date;
|
||||
bool pending_update = false;
|
||||
|
||||
static UpdateState load();
|
||||
void save();
|
||||
// To prevent concurrent modification of the file, we enforce this interface, which locks the file while
|
||||
// the state_modifier is active.
|
||||
static void store(std::function<void(UpdateState&)> state_modifier);
|
||||
static UpdateState read();
|
||||
};
|
||||
Reference in New Issue
Block a user