Skip to content

Commit c9ec8dc

Browse files
committed
fix: 修复公告和更新公告冲突的bug
1 parent 91a30d5 commit c9ec8dc

8 files changed

Lines changed: 68 additions & 49 deletions

File tree

.idea/.idea.MFAAvalonia/.idea/avalonia.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MFAAvalonia.sln.DotSettings.user

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AITextRunConstructionContext_002Ecs_002Fl_003AE_0021_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F0af201622811400d8eb6a5078e80a6dca4400_003F_005F6ed7d_003FITextRunConstructionContext_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
119119
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AIWindowImpl_002Ecs_002Fl_003AE_0021_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Ff571f37fed6244e1a931556f6afbcbb7100c00_003Fc5_003F02dd2a93_003FIWindowImpl_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
120120
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AJsonConvert_002Ecs_002Fl_003AE_0021_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003Ff3981d658666ec9cc1e6958fe22f8614bfe02ccb6625b056c3ece3729c9262_003FJsonConvert_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
121+
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AJsonSerializerSettings_002Ecs_002Fl_003AE_0021_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003Fd013391e3e3a38b9adb9cad82ad2e93d9e74c35cf211de986348b2f26e11bf_003FJsonSerializerSettings_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
121122
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AKeyBinding_002Ecs_002Fl_003AE_0021_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fb9017673fbe6420ea911c78ae6f2cef71e2200_003F8d_003F9697e034_003FKeyBinding_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
122123
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AKeyboardEventData_002Ecs_002Fl_003AE_0021_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Ff1d6f444543f47629fdfe31368a6b9b912400_003F3d_003Fec1598f9_003FKeyboardEventData_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
123124
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AKeyboardHookEventArgs_002Ecs_002Fl_003AE_0021_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Ff1d6f444543f47629fdfe31368a6b9b912400_003F73_003Fc82ed98b_003FKeyboardHookEventArgs_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
@@ -133,6 +134,11 @@
133134
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AList_00601_002Ecs_002Fl_003AE_0021_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F2832e8c2b81f4641b3863f406ce3a519c90938_003F0c_003Fd2e6f213_003FList_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
134135
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AList_00601_002Ecs_002Fl_003AE_0021_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F4ccce13aaac2432faef128d5ef881327b528_003Fc7_003F01ef6b45_003FList_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
135136
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AMaaAdbController_002Ecs_002Fl_003AE_0021_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F09b964479797448c820cdf1d3627c44a1c800_003F78_003Fdadfb352_003FMaaAdbController_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
137+
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AMaaAgentClient_002Ecs_002Fl_003AE_0021_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F87ac3fb372dc460c990852948a73ff4a1a600_003F2c_003F8948e3a5_003FMaaAgentClient_002Ecs_002Fz_003A2_002D0/@EntryIndexedValue">ForceIncluded</s:String>
138+
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AMaaAgentClient_002Ecs_002Fl_003AE_0021_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F87ac3fb372dc460c990852948a73ff4a1a600_003F2c_003F8948e3a5_003FMaaAgentClient_002Ecs_002Fz_003A2_002D1/@EntryIndexedValue">ForceIncluded</s:String>
139+
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AMaaAgentClient_002Ecs_002Fl_003AE_0021_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F87ac3fb372dc460c990852948a73ff4a1a600_003Ff6_003F84c014d5_003FMaaAgentClient_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
140+
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AMaaAgentClient_002Ecs_002Fl_003AE_0021_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F87ac3fb372dc460c990852948a73ff4a1a600_003Ff6_003F84c014d5_003FMaaAgentClient_002Ecs_002Fz_003A2_002D0/@EntryIndexedValue">ForceIncluded</s:String>
141+
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AMaaAgentClient_002Ecs_002Fl_003AE_0021_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F87ac3fb372dc460c990852948a73ff4a1a600_003Ff6_003F84c014d5_003FMaaAgentClient_002Ecs_002Fz_003A2_002D1/@EntryIndexedValue">ForceIncluded</s:String>
136142
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AMaaAgentClient_002Ecs_002Fl_003AE_0021_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fc7e934b7b23a47038a781cda6613ea8e1a200_003F10_003F3e4cd3f7_003FMaaAgentClient_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
137143
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AMaaJobStatusExtensions_002Ecs_002Fl_003AE_0021_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F96f8521a96427be1403ee9ca27407a7ea6b59f5d3dd17a964fd4809cf75a2c_003FMaaJobStatusExtensions_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
138144
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AMaaMsg_002Ecs_002Fl_003AE_0021_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F84fddc41edd64791b79597db4b96103a10400_003Fbe_003Fc15d7d89_003FMaaMsg_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
@@ -289,8 +295,12 @@
289295

290296
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=Miscellaneous_0020Files_002FSicokyj/@EntryIndexedValue">False</s:Boolean>
291297
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=Miscellaneous_0020Files_002FSicokyj/@EntryIndexRemoved">True</s:Boolean>
298+
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=Miscellaneous_0020Files_002FSicuwak/@EntryIndexedValue">False</s:Boolean>
299+
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=Miscellaneous_0020Files_002FSicuwak/@EntryIndexRemoved">True</s:Boolean>
292300
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=Miscellaneous_0020Files_002FSyvawig/@EntryIndexedValue">False</s:Boolean>
293301
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=Miscellaneous_0020Files_002FSyvawig/@EntryIndexRemoved">True</s:Boolean>
302+
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=Miscellaneous_0020Files_002FWefezub/@EntryIndexedValue">False</s:Boolean>
303+
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=Miscellaneous_0020Files_002FWefezub/@EntryIndexRemoved">True</s:Boolean>
294304

295305

296306

MFAAvalonia/Assets/Style/MdXaml.axaml

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -22,49 +22,4 @@
2222
</Style>
2323
</Style>
2424
</Styles>
25-
<Styles x:Key="MdXamlStyle">
26-
<Style Selector="ctxt|CTextBlock.Heading1">
27-
<Setter Property="FontSize" Value="30" />
28-
<Setter Property="Margin" Value="0,0,15,0" />
29-
<Setter Property="FontWeight" Value="UltraBold" />
30-
<Setter Property="Foreground" Value="{DynamicResource SukiText}" />
31-
</Style>
32-
<Style Selector="ctxt|CTextBlock.Heading2">
33-
<Setter Property="Margin" Value="5,10,15,10" />
34-
<Setter Property="FontSize" Value="24" />
35-
<Setter Property="FontWeight" Value="Bold" />
36-
<Setter Property="Foreground" Value="{DynamicResource SukiText}" />
37-
</Style>
38-
<Style Selector="ctxt|CTextBlock.Heading3">
39-
<Setter Property="Margin" Value="5,10,10,10" />
40-
<Setter Property="FontSize" Value="20" />
41-
<Setter Property="FontWeight" Value="Bold" />
42-
<Setter Property="Foreground" Value="{DynamicResource SukiText}" />
43-
</Style>
44-
<Style Selector="ctxt|CTextBlock.Heading4">
45-
<Setter Property="Margin" Value="5,10,5,10" />
46-
<Setter Property="FontSize" Value="17" />
47-
<Setter Property="FontWeight" Value="Bold" />
48-
<Setter Property="Foreground" Value="{DynamicResource SukiText}" />
49-
</Style>
50-
<Style Selector="ctxt|CTextBlock.Heading5">
51-
<Setter Property="FontSize" Value="15" />
52-
<Setter Property="FontWeight" Value="Bold" />
53-
<Setter Property="Foreground" Value="{DynamicResource SukiText}" />
54-
</Style>
55-
<Style Selector="ctxt|CTextBlock.Heading6">
56-
<Setter Property="FontSize" Value="12" />
57-
<Setter Property="FontWeight" Value="Bold" />
58-
<Setter Property="Foreground" Value="{DynamicResource SukiText}" />
59-
</Style>
60-
<Style Selector="ctxt|CCode">
61-
<Style.Setters>
62-
<Setter Property="MonospaceFontFamily" Value="Consolas, Microsoft YaHei, Global Monospace" />
63-
<Setter Property="Padding" Value="20,10"/>
64-
<Setter Property="MonospaceFontFamily" Value="Meiryo" />
65-
<Setter Property="Foreground" Value="{DynamicResource SukiLowText}" />
66-
<Setter Property="Background" Value="{DynamicResource SukiBackground}" />
67-
</Style.Setters>
68-
</Style>
69-
</Styles>
7025
</ResourceDictionary>
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<Styles xmlns="https://github.com/avaloniaui"
2+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3+
xmlns:ctxt="clr-namespace:ColorTextBlock.Avalonia;assembly=ColorTextBlock.Avalonia">
4+
5+
<Style Selector="ctxt|CTextBlock.Heading1">
6+
<Setter Property="FontSize" Value="30" />
7+
<Setter Property="Margin" Value="0,0,15,0" />
8+
<Setter Property="FontWeight" Value="UltraBold" />
9+
<Setter Property="Foreground" Value="{DynamicResource SukiText}" />
10+
</Style>
11+
<Style Selector="ctxt|CTextBlock.Heading2">
12+
<Setter Property="Margin" Value="5,10,15,10" />
13+
<Setter Property="FontSize" Value="24" />
14+
<Setter Property="FontWeight" Value="Bold" />
15+
<Setter Property="Foreground" Value="{DynamicResource SukiText}" />
16+
</Style>
17+
<Style Selector="ctxt|CTextBlock.Heading3">
18+
<Setter Property="Margin" Value="5,10,10,10" />
19+
<Setter Property="FontSize" Value="20" />
20+
<Setter Property="FontWeight" Value="Bold" />
21+
<Setter Property="Foreground" Value="{DynamicResource SukiText}" />
22+
</Style>
23+
<Style Selector="ctxt|CTextBlock.Heading4">
24+
<Setter Property="Margin" Value="5,10,5,10" />
25+
<Setter Property="FontSize" Value="17" />
26+
<Setter Property="FontWeight" Value="Bold" />
27+
<Setter Property="Foreground" Value="{DynamicResource SukiText}" />
28+
</Style>
29+
<Style Selector="ctxt|CTextBlock.Heading5">
30+
<Setter Property="FontSize" Value="15" />
31+
<Setter Property="FontWeight" Value="Bold" />
32+
<Setter Property="Foreground" Value="{DynamicResource SukiText}" />
33+
</Style>
34+
<Style Selector="ctxt|CTextBlock.Heading6">
35+
<Setter Property="FontSize" Value="12" />
36+
<Setter Property="FontWeight" Value="Bold" />
37+
<Setter Property="Foreground" Value="{DynamicResource SukiText}" />
38+
</Style>
39+
<Style Selector="ctxt|CCode">
40+
<Style.Setters>
41+
<Setter Property="MonospaceFontFamily" Value="Consolas, Microsoft YaHei, Global Monospace" />
42+
<Setter Property="Padding" Value="20,10" />
43+
<Setter Property="MonospaceFontFamily" Value="Meiryo" />
44+
<Setter Property="Foreground" Value="{DynamicResource SukiLowText}" />
45+
<Setter Property="Background" Value="{DynamicResource SukiBackground}" />
46+
</Style.Setters>
47+
</Style>
48+
</Styles>

MFAAvalonia/Extensions/MaaFW/MaaProcessor.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,11 @@ public static string FindPythonPath(string? program)
296296

297297
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
298298
var identifier = string.IsNullOrWhiteSpace(Interface?.Agent?.Identifier) ? new string(Enumerable.Repeat(chars, 8).Select(c => c[Random.Next(c.Length)]).ToArray()) : Interface.Agent.Identifier;
299-
_agentClient = MaaAgentClient.Create(identifier, maaResource);
300-
299+
LoggerHelper.Info($"Agent Identifier: {identifier}");
301300
try
302301
{
302+
_agentClient = MaaAgentClient.Create(identifier, maaResource);
303+
LoggerHelper.Info($"Agent Client Hash: {_agentClient?.GetHashCode()}");
303304
if (!Directory.Exists($"{AppContext.BaseDirectory}"))
304305
Directory.CreateDirectory($"{AppContext.BaseDirectory}");
305306
var program = MaaInterface.ReplacePlaceholder(agentConfig.ChildExec, AppContext.BaseDirectory);
@@ -312,6 +313,8 @@ public static string FindPythonPath(string? program)
312313
UseShellExecute = false,
313314
RedirectStandardError = true,
314315
RedirectStandardOutput = true,
316+
StandardErrorEncoding = Encoding.UTF8,
317+
StandardOutputEncoding = Encoding.UTF8,
315318
WindowStyle = ProcessWindowStyle.Hidden,
316319
CreateNoWindow = true
317320
};

MFAAvalonia/Helper/JsonHelper.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using MFAAvalonia.Extensions;
22
using MFAAvalonia.Helper;
33
using Newtonsoft.Json;
4+
using Newtonsoft.Json.Linq;
45
using System;
56
using System.IO;
67
using System.Reflection;

MFAAvalonia/MFAAvalonia.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,12 @@
7878
<PackageReference Include="DesktopNotifications.Apple" Version="1.3.1" />
7979
<PackageReference Include="DesktopNotifications.Avalonia" Version="1.3.1" />
8080
<PackageReference Include="FluentIcons.Avalonia.Fluent" Version="1.1.301" />
81+
<PackageReference Include="Maa.AgentBinary" Version="1.1.0" />
8182
<PackageReference Include="Maa.Framework" Version="4.2.0" />
8283
<PackageReference Include="Maa.Framework.Binding.Extensions" Version="4.2.0" />
8384
<PackageReference Include="Maa.Framework.Binding.Native" Version="4.2.0" />
8485
<PackageReference Include="Maa.Framework.Native" Version="4.2.0" />
85-
<PackageReference Include="Maa.Framework.Runtimes" Version="4.2.3" />
86+
<PackageReference Include="Maa.Framework.Runtimes" Version="4.3.0-beta.4" />
8687
<PackageReference Include="MailKit" Version="4.12.1" />
8788
<PackageReference Include="Markdown.Avalonia" Version="11.0.3-a1" />
8889
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.13.0" />

MFAAvalonia/Views/Windows/AnnouncementView.axaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
<StaticResource ResourceKey="MdXamlPlugin" />
5858
</full:MarkdownScrollViewer.Plugins>
5959
<full:MarkdownScrollViewer.Styles>
60-
<StaticResource ResourceKey="MdXamlStyle" />
60+
<StyleInclude Source="avares://MFAAvalonia/Assets/Style/MdXamlStyles.axaml" />
6161
</full:MarkdownScrollViewer.Styles>
6262
</full:MarkdownScrollViewer>
6363
</ScrollViewer>

0 commit comments

Comments
 (0)