mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-17 18:01:26 +08:00
fix: 点赞作业添加返回值检查
This commit is contained in:
@@ -550,6 +550,7 @@ namespace MaaWpfGui
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
CouldLikeWebJson = false;
|
||||
|
||||
string jsonParam = JsonConvert.SerializeObject(new
|
||||
@@ -557,7 +558,12 @@ namespace MaaWpfGui
|
||||
id = CopilotId,
|
||||
rating = rating,
|
||||
});
|
||||
WebService.RequestPost(_copilotRatingUrl, jsonParam);
|
||||
if (WebService.RequestPost(_copilotRatingUrl, jsonParam) == null)
|
||||
{
|
||||
AddLog(Localization.GetString("FailedToLikeWebJson"), UILogColor.Error);
|
||||
return;
|
||||
}
|
||||
|
||||
_recentlyRatedCopilotId.Add(CopilotId);
|
||||
AddLog(Localization.GetString("ThanksForLikeWebJson"), UILogColor.Info);
|
||||
}
|
||||
|
||||
@@ -370,7 +370,8 @@
|
||||
<system:String x:Key="SelectTheFile">Select task file</system:String>
|
||||
<system:String x:Key="SelectTheFileTip">Task files can be directly dragged in with the mouse (o゚v゚)ノ</system:String>
|
||||
<system:String x:Key="DoYouLikeThisWebJson">Do you like this task file?</system:String>
|
||||
<system:String x:Key="ThanksForLikeWebJson">Thanks for the review!\nThe comment section will be opened soon on the web page, so stay tuned!</system:String>
|
||||
<system:String x:Key="FailedToLikeWebJson">An error occurred, the like failed. : <</system:String>
|
||||
<system:String x:Key="ThanksForLikeWebJson">Thanks for the likes!\nThe comment section will be opened soon on the web page, so stay tuned!</system:String>
|
||||
<system:String x:Key="AutoSquad">Auto squad</system:String>
|
||||
<system:String x:Key="AutoSquadTip">The operator of "special focus" cannot be identified at this time</system:String>
|
||||
<system:String x:Key="LoopTimes">LoopTimes</system:String>
|
||||
|
||||
@@ -373,6 +373,7 @@
|
||||
<system:String x:Key="SelectTheFile">选择作业</system:String>
|
||||
<system:String x:Key="SelectTheFileTip">作业文件可以直接用鼠标拖进来哦 (o゚v゚)ノ</system:String>
|
||||
<system:String x:Key="DoYouLikeThisWebJson">作业怎么样?评价下吧!</system:String>
|
||||
<system:String x:Key="FailedToLikeWebJson">出现错误,评价失败 : <</system:String>
|
||||
<system:String x:Key="ThanksForLikeWebJson">感谢评价!\n网页端即将开放评论区,敬请期待!</system:String>
|
||||
<system:String x:Key="AutoSquad">自动编队</system:String>
|
||||
<system:String x:Key="LoopTimes">循环次数</system:String>
|
||||
|
||||
Reference in New Issue
Block a user