mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-11 05:52:19 +02:00
updating: do not update update_check date when we couldn't do it (#9038)
* updating: do not update update_check date when we couldn't do it - improve general settings page "Last Checked" feature
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include <string>
|
||||
#include <future>
|
||||
#include <filesystem>
|
||||
#include <variant>
|
||||
#include <winrt/Windows.Foundation.h>
|
||||
#include <expected.hpp>
|
||||
|
||||
@@ -13,6 +14,9 @@
|
||||
namespace updating
|
||||
{
|
||||
using winrt::Windows::Foundation::Uri;
|
||||
struct version_up_to_date {};
|
||||
using github_version_info = std::variant<new_version_download_info, version_up_to_date>;
|
||||
|
||||
struct new_version_download_info
|
||||
{
|
||||
Uri release_page_uri = nullptr;
|
||||
@@ -21,10 +25,11 @@ namespace updating
|
||||
std::wstring installer_filename;
|
||||
};
|
||||
|
||||
std::future<void> try_autoupdate(const bool download_updates_automatically, const notifications::strings&);
|
||||
// Returns whether the update check has succeeded
|
||||
std::future<bool> try_autoupdate(const bool download_updates_automatically, const notifications::strings&);
|
||||
std::filesystem::path get_pending_updates_path();
|
||||
std::future<std::wstring> download_update(const notifications::strings&);
|
||||
std::future<nonstd::expected<new_version_download_info, std::wstring>> get_new_github_version_info_async(const notifications::strings& strings, const bool prerelease = false);
|
||||
std::future<nonstd::expected<github_version_info, std::wstring>> get_github_version_info_async(const notifications::strings& strings, const bool prerelease = false);
|
||||
|
||||
// non-localized
|
||||
constexpr inline std::wstring_view INSTALLER_FILENAME_PATTERN = L"powertoyssetup";
|
||||
|
||||
Reference in New Issue
Block a user