Skip to content

Commit 7becc8b

Browse files
committed
FIxes due to cherry-pick
1 parent 3828e61 commit 7becc8b

5 files changed

Lines changed: 7 additions & 32 deletions

File tree

CollapseLauncher/Classes/InstallManagement/Base/InstallManagerBase.Sophon.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -870,8 +870,8 @@ await x.GetDownloadedPreloadSize(
870870
Status.IsProgressPerFileIndetermined = false;
871871
Status.IsProgressAllIndetermined = false;
872872
Status.ActivityStatus = $"{(IsSophonInUpdateMode && !isPreloadMode
873-
? Locale.Lang?._Misc?.UpdatingAndApplying
874-
: isSophonPreloadCompleted ? Locale.Lang?._Misc?.Verifying : Locale.Lang?._Misc?.Downloading)}: {string.Format(Locale.Lang?._Misc?.PerFromTo ?? "", ProgressAllCountCurrent,
873+
? Locale.Current.Lang?._Misc?.UpdatingAndApplying
874+
: isSophonPreloadCompleted ? Locale.Current.Lang?._Misc?.Verifying : Locale.Current.Lang?._Misc?.Downloading)}: {string.Format(Locale.Current.Lang?._Misc?.PerFromTo ?? "", ProgressAllCountCurrent,
875875
ProgressAllCountTotal)}";
876876
UpdateStatus();
877877

CollapseLauncher/Classes/InstallManagement/Base/InstallManagerBase.SophonPatch.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ void UpdateCurrentDownloadStatus()
687687
string perFromToLocale = string.Format(Locale.Current.Lang?._Misc?.PerFromTo ?? "",
688688
ProgressAllCountCurrent,
689689
ProgressAllCountTotal);
690-
Status.ActivityStatus = $"{(IsSophonInPreloadVerifyMode ? Locale.Lang?._Misc?.Verifying : Locale.Lang?._Misc?.Downloading)}: {perFromToLocale}";
690+
Status.ActivityStatus = $"{(IsSophonInPreloadVerifyMode ? Locale.Current.Lang?._Misc?.Verifying : Locale.Current.Lang?._Misc?.Downloading)}: {perFromToLocale}";
691691
UpdateStatus();
692692
}
693693

CollapseLauncher/Classes/Interfaces/Class/ProgressBase.cs

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -583,8 +583,8 @@ protected void UpdateSophonDownloadStatus(SophonAsset _)
583583
{
584584
Interlocked.Add(ref ProgressAllCountCurrent, 1);
585585
Status.ActivityStatus = $"{(IsSophonInUpdateMode
586-
? Locale.Lang?._Misc?.Updating
587-
: IsSophonInPreloadVerifyMode ? Locale.Lang?._Misc?.Verifying : Locale.Lang?._Misc?.Downloading)}: {string.Format(Locale.Lang?._Misc?.PerFromTo ?? "", ProgressAllCountCurrent,
586+
? Locale.Current.Lang?._Misc?.Updating
587+
: IsSophonInPreloadVerifyMode ? Locale.Current.Lang?._Misc?.Verifying : Locale.Current.Lang?._Misc?.Downloading)}: {string.Format(Locale.Current.Lang?._Misc?.PerFromTo ?? "", ProgressAllCountCurrent,
588588
ProgressAllCountTotal)}";
589589
UpdateStatus();
590590
}
@@ -1364,31 +1364,6 @@ await downloadClient.DownloadAsync(assetURL,
13641364
}
13651365
}
13661366

1367-
[return: NotNullIfNotNull(nameof(url))]
1368-
internal string? GetHttpsOrHttpOverrideUrl(string? url)
1369-
{
1370-
const string schemeStart = "://";
1371-
1372-
if (string.IsNullOrEmpty(url))
1373-
{
1374-
return url;
1375-
}
1376-
1377-
string scheme = IsForceHttpOverride ? "http://" : "https://";
1378-
if (url.StartsWith(scheme, StringComparison.OrdinalIgnoreCase))
1379-
{
1380-
return url;
1381-
}
1382-
1383-
string urlNoScheme = url;
1384-
int indexOfSchemeMark = url.IndexOf(schemeStart, StringComparison.OrdinalIgnoreCase);
1385-
if (indexOfSchemeMark < 0) return scheme + urlNoScheme;
1386-
1387-
indexOfSchemeMark += schemeStart.Length;
1388-
urlNoScheme = url[indexOfSchemeMark..];
1389-
return scheme + urlNoScheme;
1390-
}
1391-
13921367
[return: NotNullIfNotNull(nameof(url))]
13931368
internal string? GetHttpsOrHttpOverrideUrl(string? url)
13941369
{

CollapseLauncher/Classes/RepairManagement/HonkaiV2/HonkaiRepairV2.AsbExt.Audio.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ async ValueTask ImplCheckAndAdd(ManifestAssetInfo audioAsset, CancellationToken
9595
goto AddAsset; // I love goto. Dun ask me why :>
9696
}
9797

98-
progressibleInstance.Status.ActivityStatus = string.Format(Locale.Lang?._GameRepairPage?.Status15 ?? "", audioAsset.Path);
98+
progressibleInstance.Status.ActivityStatus = string.Format(Locale.Current.Lang?._GameRepairPage?.Status15 ?? "", audioAsset.Path);
9999
progressibleInstance.Status.IsProgressAllIndetermined = true;
100100
progressibleInstance.Status.IsProgressPerFileIndetermined = true;
101101
progressibleInstance.UpdateStatus();

CollapseLauncher/Classes/RepairManagement/HonkaiV2/HonkaiRepairV2.AsbExt.Cache.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ private static async Task<List<CacheAssetInfo>>
7474

7575
// Update Progress
7676
progressibleInstance.Status.ActivityStatus =
77-
string.Format(Locale.Lang?._CachesPage?.CachesStatusFetchingType ?? "", cacheType);
77+
string.Format(Locale.Current.Lang?._CachesPage?.CachesStatusFetchingType ?? "", cacheType);
7878
progressibleInstance.Status.IsProgressAllIndetermined = true;
7979
progressibleInstance.Status.IsIncludePerFileIndicator = false;
8080

0 commit comments

Comments
 (0)