Skip to content

Commit 0b4ce92

Browse files
Cryotechnicneon-nyan
authored andcommitted
Fix incorrect state display based on preload status
Will now display "Downloading" or "Verifying" depending on what's being done.
1 parent a79df09 commit 0b4ce92

3 files changed

Lines changed: 10 additions & 9 deletions

File tree

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -654,8 +654,9 @@ protected virtual async Task StartPackageUpdateSophon(GameInstallStateEnum gameS
654654
ResetStatusAndProgress();
655655

656656
// Set the progress bar to indetermined
657-
IsSophonInUpdateMode = !isPreloadMode;
658-
Status.IsIncludePerFileIndicator = !isPreloadMode;
657+
IsSophonInUpdateMode = !isPreloadMode;
658+
IsSophonInPreloadVerifyMode = isPreloadMode && _isSophonPreloadCompleted;
659+
Status.IsIncludePerFileIndicator = !isPreloadMode;
659660
Status.IsProgressPerFileIndetermined = true;
660661
Status.IsProgressAllIndetermined = true;
661662
UpdateStatus();
@@ -868,8 +869,8 @@ await x.GetDownloadedPreloadSize(
868869
Status.IsProgressPerFileIndetermined = false;
869870
Status.IsProgressAllIndetermined = false;
870871
Status.ActivityStatus = $"{(IsSophonInUpdateMode && !isPreloadMode
871-
? Locale.Lang._Misc.UpdatingAndApplying
872-
: Locale.Lang._Misc.Downloading)}: {string.Format(Locale.Lang._Misc.PerFromTo, ProgressAllCountCurrent,
872+
? Locale.Current.Lang?._Misc?.UpdatingAndApplying
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
@@ -672,7 +672,7 @@ void UpdateCurrentDownloadStatus()
672672
string perFromToLocale = string.Format(Locale.Lang._Misc.PerFromTo,
673673
ProgressAllCountCurrent,
674674
ProgressAllCountTotal);
675-
Status.ActivityStatus = $"{Locale.Lang._Misc.Downloading}: {perFromToLocale}";
675+
Status.ActivityStatus = $"{(IsSophonInPreloadVerifyMode ? Locale.Current.Lang?._Misc?.Verifying : Locale.Current.Lang?._Misc?.Downloading)}: {perFromToLocale}";
676676
UpdateStatus();
677677
}
678678

CollapseLauncher/Classes/Interfaces/Class/ProgressBase.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ public ObservableCollection<IAssetProperty> AssetEntry
169169
private const int RefreshInterval = 100;
170170

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

174175

@@ -581,10 +582,9 @@ protected void UpdateSophonDownloadStatus(SophonAsset _)
581582
{
582583
Interlocked.Add(ref ProgressAllCountCurrent, 1);
583584
Status.ActivityStatus = $"{(IsSophonInUpdateMode
584-
? Locale.Lang._Misc.Updating
585-
: Locale.Lang._Misc.Downloading)}: {string.Format(Locale.Lang._Misc.PerFromTo, ProgressAllCountCurrent,
586-
ProgressAllCountTotal)}";
587-
585+
? Locale.Current.Lang?._Misc?.Updating
586+
: IsSophonInPreloadVerifyMode ? Locale.Current.Lang?._Misc?.Verifying : Locale.Current.Lang?._Misc?.Downloading)}: {string.Format(Locale.Current.Lang?._Misc?.PerFromTo ?? "", ProgressAllCountCurrent,
587+
ProgressAllCountTotal)}";
588588
UpdateStatus();
589589
}
590590

0 commit comments

Comments
 (0)