feat.支持更多资源的OTA升级

This commit is contained in:
MistEO
2022-06-09 19:18:01 +08:00
parent 78f31c26eb
commit 5bbce8fac6
2 changed files with 7 additions and 4 deletions

View File

@@ -1055,7 +1055,8 @@ namespace MeoAsstGui
var updateModle = _container.Get<VersionUpdateViewModel>();
Task.Run(() =>
{
if (!updateModle.CheckAndDownloadUpdate(true))
if (!updateModle.CheckAndDownloadUpdate(true)
&& !updateModle.ResourceOTA(true))
{
using (var toast = new ToastNotification("已是最新版本~"))
{

View File

@@ -621,10 +621,10 @@ namespace MeoAsstGui
return true;
}
public bool ResourceOTA()
public bool ResourceOTA(bool force = false)
{
// 开发版不检查更新
if (!isStableVersion())
if (!force && !isStableVersion())
{
return false;
}
@@ -650,7 +650,9 @@ namespace MeoAsstGui
var update_dict = new Dictionary<string, string>()
{
{ "resource/stages.json" , "resource/stages.json"},
{ "resource/recruit.json", "resource/recruit.json" }
{ "resource/recruit.json", "resource/recruit.json" },
{ "3rdparty/resource/Arknights-Tile-Pos/levels.json" , "resource/Arknights-Tile-Pos/levels.json"},
{ "resource/item_index.json", "resource/item_index.json" }
};
bool updated = false;