Skip to content

Commit 75e3d67

Browse files
authored
[Hotfix] Preview 1.83.10 (#800)
# What's Changed? - **[Fix]** Sophon Update Issues, by @neon-nyan - Fix invalid FileAccess and FileShare on Patch Download - Fix Sophon's IsSkipHashCheckOnWrite logic - Increase Sophon Patch download buffer to 64 KB max - **[Fix]** Bring back detailed exception messages for better diagnostic, by @neon-nyan
2 parents 1690f2e + 2f72fc9 commit 75e3d67

File tree

7 files changed

+5
-139511
lines changed

7 files changed

+5
-139511
lines changed

CollapseLauncher/Classes/AnimatedVisuals/Lottie/TempResetIndonesiaTaglineCrisis.cs

Lines changed: 0 additions & 139297 deletions
This file was deleted.

CollapseLauncher/Classes/AnimatedVisuals/Lottie/TempResetIndonesiaTaglineCrisis.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

CollapseLauncher/CollapseLauncher.csproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<Authors>$(Company). neon-nyan, Cry0, bagusnl, shatyuka, gablm.</Authors>
1717
<Copyright>Copyright 2022-2025 $(Company)</Copyright>
1818
<!-- Versioning -->
19-
<Version>1.83.9</Version>
19+
<Version>1.83.10</Version>
2020
<LangVersion>preview</LangVersion>
2121
<!-- Target Settings -->
2222
<Platforms>x64</Platforms>
@@ -142,13 +142,12 @@
142142
<IlcGenerateDgmlFile>false</IlcGenerateDgmlFile>
143143

144144
<!-- Security and Resource Management -->
145-
<AutoreleasePoolSupport>false</AutoreleasePoolSupport>
146145
<EnableUnsafeBinaryFormatterSerialization>false</EnableUnsafeBinaryFormatterSerialization>
147146
<EnableUnsafeUTF7Encoding>false</EnableUnsafeUTF7Encoding>
148147
<EventSourceSupport>false</EventSourceSupport>
149148
<HttpActivityPropagationSupport>false</HttpActivityPropagationSupport>
150149
<MetricsSupport>false</MetricsSupport>
151-
<UseSystemResourceKeys>true</UseSystemResourceKeys>
150+
<UseSystemResourceKeys>false</UseSystemResourceKeys>
152151
<XmlResolverIsNetworkingEnabledByDefault>false</XmlResolverIsNetworkingEnabledByDefault>
153152

154153
<!-- Instruction Sets -->

CollapseLauncher/XAMLs/MainApp/MainWindow.xaml

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -53,47 +53,6 @@
5353
<AnimatedVisualPlayer x:Name="IntroAnimation"
5454
AutoPlay="False"
5555
Visibility="Collapsed" />
56-
<Grid x:Name="Temporary20250827CrisisIntro"
57-
Margin="32"
58-
HorizontalAlignment="Stretch"
59-
VerticalAlignment="Bottom"
60-
Visibility="Collapsed">
61-
<Grid.ColumnDefinitions>
62-
<ColumnDefinition />
63-
<ColumnDefinition Width="Auto" />
64-
</Grid.ColumnDefinitions>
65-
<ToggleSwitch Grid.Column="1"
66-
HorizontalAlignment="Right"
67-
IsOn="{x:Bind IsEnableCrisisIntro, Mode=TwoWay}"
68-
OffContent="Disable this Crisis Intro Animation"
69-
OnContent="Enable this Crisis Intro Animation" />
70-
<Button Grid.Column="0"
71-
Margin="0,0,32,0"
72-
Click="Temporary20250827CrisisIntroButton_OnClick"
73-
Opacity=".5"
74-
PointerEntered="IntroSequenceToggle_PointerEntered"
75-
PointerExited="IntroSequenceToggle_PointerExited"
76-
Style="{ThemeResource TransparentDefaultButtonStyle}">
77-
<Grid Margin="0,0"
78-
ColumnSpacing="8">
79-
<Grid.ColumnDefinitions>
80-
<ColumnDefinition Width="Auto" />
81-
<ColumnDefinition />
82-
</Grid.ColumnDefinitions>
83-
<TextBlock Grid.Column="1"
84-
HorizontalAlignment="Left"
85-
VerticalAlignment="Center"
86-
FontWeight="SemiBold"
87-
Text="Learn more about &quot;Indonesian Government Untrust Protest&quot; Crisis (by The Jakarta Post &amp; Al Jazeera)"
88-
TextWrapping="Wrap" />
89-
<FontIcon Grid.Column="0"
90-
HorizontalAlignment="Right"
91-
VerticalAlignment="Center"
92-
FontSize="18"
93-
Glyph="&#xE946;" />
94-
</Grid>
95-
</Button>
96-
</Grid>
9756
<CheckBox x:Name="IntroSequenceToggle"
9857
Margin="32,32,16,24"
9958
HorizontalAlignment="Right"

CollapseLauncher/XAMLs/MainApp/MainWindow.xaml.cs

Lines changed: 1 addition & 166 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using CollapseLauncher.AnimatedVisuals.Lottie;
2-
using CollapseLauncher.CustomControls;
32
using CollapseLauncher.Extension;
43
using CollapseLauncher.Helper;
54
using CollapseLauncher.Helper.Animation;
@@ -23,8 +22,6 @@
2322
using Microsoft.UI.Xaml.Media;
2423
using Microsoft.UI.Xaml.Media.Animation;
2524
using System;
26-
using System.Diagnostics;
27-
using System.Globalization;
2825
using System.Linq;
2926
using System.Threading;
3027
using System.Threading.Tasks;
@@ -115,172 +112,10 @@ public void StartMainPage()
115112
{
116113
WindowUtility.SetWindowSize(WindowSize.WindowSize.CurrentWindowSize.WindowBounds.Width, WindowSize.WindowSize.CurrentWindowSize.WindowBounds.Height);
117114

118-
if (IsCrisisIntroEnabled())
119-
{
120-
RunCrisisIntroSequence();
121-
}
122-
else
123-
{
124-
RunIntroSequence();
125-
}
126-
115+
RunIntroSequence();
127116
RootFrame.Navigate(typeof(MainPage), null, new DrillInNavigationTransitionInfo());
128117
}
129118

130-
#region TEMPORARY: August 27th, 2025 Temporary Intro due to current Indonesian's crisis
131-
public bool IsEnableCrisisIntro
132-
{
133-
get => GetAppConfigValue("Enable20250827CrisisIntro");
134-
set => SetAndSaveConfigValue("Enable20250827CrisisIntro", value);
135-
}
136-
137-
public bool IsShownCrisisIntroDialog
138-
{
139-
get => GetAppConfigValue("Enable20250827CrisisIntroDialog");
140-
set => SetAndSaveConfigValue("Enable20250827CrisisIntroDialog", value);
141-
}
142-
143-
// Starts the intro at 00:00 AM Jakarta Time - September 1st -> 00:00 AM Jakarta Time - September 8th.
144-
private readonly DateTime _dateTimeCrisisOffsetStart
145-
= new DateTimeOffset(2025, 9, 1, 0, 0, 0, TimeSpan.FromHours(7)).UtcDateTime;
146-
private readonly DateTime _dateTimeCrisisOffsetEnd
147-
= new DateTimeOffset(2025, 9, 8, 0, 0, 0, TimeSpan.FromHours(7)).UtcDateTime;
148-
149-
private bool IsCrisisIntroEnabled()
150-
{
151-
DateTime nowDateTimeOffset = DateTime.UtcNow;
152-
if (nowDateTimeOffset < _dateTimeCrisisOffsetStart ||
153-
nowDateTimeOffset >= _dateTimeCrisisOffsetEnd)
154-
{
155-
return false;
156-
}
157-
158-
if (_isForceDisableIntro || !IsEnableCrisisIntro)
159-
{
160-
return false;
161-
}
162-
163-
// Try to disable the intro if the user is using certain region/CultureInfo in their system.
164-
(string langId, string countryId)[] disabledLocale = [
165-
("zh", "cn")
166-
];
167-
string currentCulture = CultureInfo.CurrentUICulture.Name;
168-
169-
170-
return !disabledLocale.Any(x => currentCulture.StartsWith(x.langId, StringComparison.OrdinalIgnoreCase) &&
171-
currentCulture.EndsWith(x.countryId, StringComparison.OrdinalIgnoreCase));
172-
}
173-
174-
private void Temporary20250827CrisisIntroButton_OnClick(object sender, RoutedEventArgs e)
175-
{
176-
string[] articles = [
177-
"https://www.thejakartapost.com/indonesia/2025/08/31/five-things-to-know-about-indonesias-deadly-unrest.html",
178-
"https://www.aljazeera.com/news/2025/8/30/three-killed-in-fire-at-indonesian-government-building-blamed-on-protesters",
179-
"https://www.aljazeera.com/news/2025/8/26/indonesian-police-clash-with-students-protesting-lawmakers-salaries",
180-
"https://www.aljazeera.com/video/inside-story/2025/8/30/whats-behind-widespread-unrest-in-indonesia"
181-
];
182-
183-
foreach (string article in articles)
184-
{
185-
Process.Start(new ProcessStartInfo
186-
{
187-
FileName = article,
188-
UseShellExecute = true
189-
});
190-
}
191-
}
192-
193-
private async void RunCrisisIntroSequence()
194-
{
195-
Temporary20250827CrisisIntro.Visibility = Visibility.Visible;
196-
IntroSequenceToggle.Visibility = Visibility.Collapsed;
197-
IntroAnimation.Visibility = Visibility.Visible;
198-
199-
InputSystemCursor cursorType = InputSystemCursor.Create(InputSystemCursorShape.Hand);
200-
Temporary20250827CrisisIntro.SetAllControlsCursorRecursive(cursorType);
201-
202-
RootFrameGrid.Opacity = 0;
203-
WindowUtility.SetWindowBackdrop(WindowBackdropKind.Mica);
204-
205-
try
206-
{
207-
if (IsShownCrisisIntroDialog)
208-
{
209-
while (m_mainPage is null)
210-
{
211-
await Task.Delay(250);
212-
}
213-
214-
TextBlock textBlock = new TextBlock
215-
{
216-
TextWrapping = TextWrapping.Wrap
217-
}.AddTextBlockLine("Hi there, it's neon-nyan. Sorry to interrupt you here but we have some important announcement we would like to share with you regarding the current situation in Indonesia. Though, you can skip this announcement and use your launcher normally.")
218-
.AddTextBlockNewLine(2)
219-
.AddTextBlockLine("Would you like to read the announcement? (Duration: ~1 minute 20 seconds)");
220-
221-
ContentDialogResult result =
222-
await SpawnDialog("[EN] Important Announcement",
223-
textBlock,
224-
closeText: "No, Skip it",
225-
primaryText: "Yes, I would like to read it",
226-
dialogTheme: ContentDialogTheme.Warning,
227-
defaultButton: ContentDialogButton.Close);
228-
229-
if (result == ContentDialogResult.None)
230-
{
231-
IsEnableCrisisIntro = false;
232-
return;
233-
}
234-
}
235-
236-
// in frames
237-
const double animAnnounceStart = 0d;
238-
const double animIntroStart = 4350d;
239-
const double animIntroPause = 4740d;
240-
const double animIntroDur = 4800d;
241-
242-
IntroAnimation.Source = new TempResetIndonesiaTaglineCrisis(); // Directly create new instance and so it triggers SetSource early.
243-
{
244-
IntroAnimation.AnimationOptimization = PlayerAnimationOptimization.Resources;
245-
if (IsAppThemeLight)
246-
{
247-
((TempResetIndonesiaTaglineCrisis)IntroAnimation.Source).Color_FFFFFF = Color.FromArgb(255, 30, 30, 30);
248-
}
249-
250-
if (IsShownCrisisIntroDialog)
251-
{
252-
await IntroAnimation.PlayAsync(animAnnounceStart / animIntroDur, animIntroStart / animIntroDur, false);
253-
IsShownCrisisIntroDialog = false;
254-
}
255-
256-
await IntroAnimation.PlayAsync(animIntroStart / animIntroDur, animIntroPause / animIntroDur, false);
257-
await Task.Delay(2500);
258-
await IntroAnimation.PlayAsync(animIntroPause / animIntroDur, animIntroDur / animIntroDur, false);
259-
IntroAnimation.Stop();
260-
}
261-
IntroAnimation.Source = null;
262-
GC.Collect();
263-
GC.WaitForPendingFinalizers();
264-
}
265-
finally
266-
{
267-
Task rootFrameAnimTask = RootFrameGrid.StartAnimation(TimeSpan.FromSeconds(0.75),
268-
RootFrameGrid.GetElementCompositor().CreateScalarKeyFrameAnimation("Opacity", 1, 0)
269-
);
270-
Task introFrameAnimTask = IntroAnimationGrid.StartAnimation(TimeSpan.FromSeconds(0.75),
271-
IntroAnimationGrid.GetElementCompositor().CreateScalarKeyFrameAnimation("Opacity", 0, 1)
272-
);
273-
274-
_ = Task.WhenAll(rootFrameAnimTask, introFrameAnimTask);
275-
WindowUtility.SetWindowBackdrop(WindowBackdropKind.None);
276-
277-
_isForceDisableIntro = true;
278-
IntroSequenceToggle.Visibility = Visibility.Collapsed;
279-
IntroAnimationGrid.Visibility = Visibility.Collapsed;
280-
}
281-
}
282-
#endregion
283-
284119
private async void RunIntroSequence()
285120
{
286121
bool isIntroEnabled = IsIntroEnabled && !_isForceDisableIntro;

CollapseLauncher/packages.lock.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,8 +549,7 @@
549549
"hi3helper.plugin.core": {
550550
"type": "Project",
551551
"dependencies": {
552-
"Microsoft.Extensions.Logging.Abstractions": "[9.0.9, )",
553-
"Microsoft.NET.ILLink.Tasks": "[9.0.9, )"
552+
"Microsoft.Extensions.Logging.Abstractions": "[9.0.9, )"
554553
}
555554
},
556555
"hi3helper.sophon": {

Hi3Helper.Sophon

0 commit comments

Comments
 (0)