fix: 修复刷信用在部分电脑上用不了的bug

This commit is contained in:
uye
2022-12-22 12:34:21 +08:00
parent 43245a2c75
commit a99f7ddfec
3 changed files with 22 additions and 4 deletions

View File

@@ -500,7 +500,10 @@ namespace MaaWpfGui
}
else if (taskChain == "Mall")
{
settingsModel.LastCreditFightTaskTime = Utils.GetYJTimeDateString();
if (settingsModel.CreditFightTaskEnabledDisplay)
{
settingsModel.LastCreditFightTaskTime = Utils.GetYJTimeDateString();
}
}
mainModel.AddLog(Localization.GetString("CompleteTask") + taskChain);

View File

@@ -1060,6 +1060,10 @@ namespace MaaWpfGui
return _creditFightTaskEnabled;
}
}
else
{
return _creditFightTaskEnabled;
}
return false;
}
@@ -1071,6 +1075,17 @@ namespace MaaWpfGui
}
}
public bool CreditFightTaskEnabledDisplay
{
get => _creditFightTaskEnabled;
set
{
SetAndNotify(ref _creditFightTaskEnabled, value);
ViewStatusStorage.Set("Visit.CreditFightTaskEnabled", value.ToString());
}
}
/* 信用商店设置 */
private bool _creditShopping = Convert.ToBoolean(ViewStatusStorage.Get("Mall.CreditShopping", bool.TrueString));

View File

@@ -17,9 +17,9 @@
</Grid.RowDefinitions>
<WrapPanel
Grid.Row="0"
MaxWidth="400"
HorizontalAlignment="Center"
Orientation="Horizontal"
MaxWidth="400">
Orientation="Horizontal">
<CheckBox
Margin="10"
HorizontalAlignment="Center"
@@ -40,7 +40,7 @@
VerticalAlignment="Center"
Block.TextAlignment="Center"
Content="{DynamicResource CreditFight}"
IsChecked="{Binding CreditFightTaskEnabled}"
IsChecked="{Binding CreditFightTaskEnabledDisplay}"
ToolTip="{DynamicResource CreditFightTip}" />
</WrapPanel>
<StackPanel