Skip to content

Commit e0f89cc

Browse files
committed
Fix incorrect state display based on preload status
Will now display "Downloading" or "Verifying" depending on what's being done.
1 parent 4825662 commit e0f89cc

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,7 @@ protected virtual async Task StartPackageUpdateSophon(GameInstallStateEnum gameS
655655

656656
// Set the progress bar to indetermined
657657
IsSophonInUpdateMode = !isPreloadMode;
658+
IsSophonInPreloadVerifyMode = isPreloadMode && _isSophonPreloadCompleted;
658659
Status.IsIncludePerFileIndicator = !isPreloadMode;
659660
Status.IsProgressPerFileIndetermined = true;
660661
Status.IsProgressAllIndetermined = true;
@@ -869,7 +870,7 @@ await x.GetDownloadedPreloadSize(
869870
Status.IsProgressAllIndetermined = false;
870871
Status.ActivityStatus = $"{(IsSophonInUpdateMode && !isPreloadMode
871872
? Locale.Current.Lang?._Misc?.UpdatingAndApplying
872-
: Locale.Current.Lang?._Misc?.Downloading)}: {string.Format(Locale.Current.Lang?._Misc?.PerFromTo ?? "", ProgressAllCountCurrent,
873+
: isSophonPreloadCompleted ? Locale.Current.Lang?._Misc?.Verifying : Locale.Current.Lang?._Misc?.Downloading)}: {string.Format(Locale.Current.Lang?._Misc?.PerFromTo ?? "", ProgressAllCountCurrent,
873874
ProgressAllCountTotal)}";
874875
UpdateStatus();
875876

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ void UpdateCurrentDownloadStatus()
673673
string perFromToLocale = string.Format(Locale.Current.Lang?._Misc?.PerFromTo ?? "",
674674
ProgressAllCountCurrent,
675675
ProgressAllCountTotal);
676-
Status.ActivityStatus = $"{Locale.Current.Lang?._Misc?.Downloading}: {perFromToLocale}";
676+
Status.ActivityStatus = $"{(IsSophonInPreloadVerifyMode ? Locale.Current.Lang?._Misc?.Verifying : Locale.Current.Lang?._Misc?.Downloading)}: {perFromToLocale}";
677677
UpdateStatus();
678678
}
679679

CollapseLauncher/Classes/Interfaces/Class/ProgressBase.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ public ObservableCollection<IAssetProperty> AssetEntry
169169
protected nint SpeedLimiterServiceContext { get; } = SpeedLimiterService.CreateServiceContext();
170170

171171
public bool IsSophonInUpdateMode { get; protected set; }
172+
public bool IsSophonInPreloadVerifyMode { get; protected set; }
172173
protected bool IsAllowExtractCorruptZip { get; set; }
173174

174175
~ProgressBase()
@@ -579,9 +580,8 @@ protected void UpdateSophonDownloadStatus(SophonAsset _)
579580
Interlocked.Add(ref ProgressAllCountCurrent, 1);
580581
Status.ActivityStatus = $"{(IsSophonInUpdateMode
581582
? Locale.Current.Lang?._Misc?.Updating
582-
: Locale.Current.Lang?._Misc?.Downloading)}: {string.Format(Locale.Current.Lang?._Misc?.PerFromTo ?? "", ProgressAllCountCurrent,
583-
ProgressAllCountTotal)}";
584-
583+
: IsSophonInPreloadVerifyMode ? Locale.Current.Lang?._Misc?.Verifying : Locale.Current.Lang?._Misc?.Downloading)}: {string.Format(Locale.Current.Lang?._Misc?.PerFromTo ?? "", ProgressAllCountCurrent,
584+
ProgressAllCountTotal)}";
585585
UpdateStatus();
586586
}
587587

0 commit comments

Comments
 (0)