[Settings] Temporary string showing the latest available version (#6254)

This commit is contained in:
Seraphima Zykova
2020-09-04 11:56:52 +03:00
committed by GitHub
parent e84a293642
commit 570065175c
12 changed files with 127 additions and 15 deletions

View File

@@ -238,16 +238,17 @@ namespace updating
}
}
std::future<void> check_new_version_available()
std::future<std::wstring> check_new_version_available()
{
const auto new_version = co_await get_new_github_version_info_async();
if (!new_version)
{
updating::notifications::show_unavailable();
co_return;
co_return VersionHelper{ VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION }.toWstring();
}
updating::notifications::show_available(new_version.value());
co_return new_version->version_string;
}
std::future<std::wstring> download_update()

View File

@@ -30,7 +30,7 @@ namespace updating
std::future<void> try_autoupdate(const bool download_updates_automatically);
std::filesystem::path get_pending_updates_path();
std::future<void> check_new_version_available();
std::future<std::wstring> check_new_version_available();
std::future<std::wstring> download_update();
// non-localized