Revert "feat: 界面更新时间根据所选客户端类型决定(外服时区还要改)"

This reverts commit 11f4212cb8.
3ddeee1d 也在这个commit里面revert了

cherrypick放到stage_manager_overseas branch里等之后一起merge
This commit is contained in:
Yifan Liu
2023-02-07 01:27:35 -06:00
parent 9e1a0d9095
commit 70fa2db091
2 changed files with 2 additions and 18 deletions

View File

@@ -58,28 +58,13 @@ namespace MaaWpfGui
}
}
private static string _clientType = ViewStatusStorage.Get("Start.ClientType", string.Empty);
public static string ClientType { get => _clientType; set => _clientType = value; }
private static readonly Dictionary<string, int> _clientTypeTimeOffsetMap = new Dictionary<string, int>
{
{ string.Empty, 4 },
{ "Official", 4 },
{ "Bilibili", 4 },
{ "txwy", 4 },
{ "YoStarEN", 4 },
{ "YoStarJP", 5 },
{ "YoStarKR", 4 },
};
/// <summary>
/// 获取yj历时间
/// </summary>
/// <returns>yj历时间</returns>
public static DateTime GetYJTimeNow()
{
return DateTime.UtcNow.AddHours(_clientTypeTimeOffsetMap[ClientType]);
return DateTime.UtcNow.AddHours(4);
}
/// <summary>
@@ -116,7 +101,7 @@ namespace MaaWpfGui
/// <returns>yj历格式的时间</returns>
public static DateTime ToYJTime(DateTime dt)
{
return dt.AddHours(_clientTypeTimeOffsetMap[ClientType]);
return dt.AddHours(4);
}
private static readonly JObject _itemList = new JObject();

View File

@@ -548,7 +548,6 @@ namespace MaaWpfGui
set
{
SetAndNotify(ref _clientType, value);
Utils.ClientType = value;
ViewStatusStorage.Set("Start.ClientType", value);
UpdateWindowTitle(); /* 每次修改客户端时更新WindowTitle */
_container.Get<TaskQueueViewModel>().UpdateStageList(true);