mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-11 02:46:16 -08:00
fix(settings): prefer current notes without updates
This commit is contained in:
1 parent
62ae5307a4
commit
6b9c09270f
2 files changed
+10
-6
No files matched your search
@@ -506,8 +506,10 @@ describe('SettingsComponent', () => {
|
||||
.mockReturnValue(createDialogRef(false));
|
||||
component.appUpdateStatus.set({
|
||||
...DEFAULT_APP_UPDATE_STATUS,
|
||||
latestVersion: undefined,
|
||||
release: undefined,
|
||||
latestVersion: '0.21.0',
|
||||
release: {
|
||||
version: '0.21.0',
|
||||
},
|
||||
status: ELECTRON_BRIDGE_APP_UPDATE_STATUSES.NotAvailable,
|
||||
});
|
||||
|
||||
|
||||
@@ -405,15 +405,17 @@ export class SettingsComponent implements OnInit, OnDestroy {
|
||||
status?.status ===
|
||||
ELECTRON_BRIDGE_APP_UPDATE_STATUSES.Downloading ||
|
||||
status?.status === ELECTRON_BRIDGE_APP_UPDATE_STATUSES.Downloaded;
|
||||
const initialReleaseNotesVersion = isUpdateRelease
|
||||
? (status?.latestVersion ??
|
||||
status?.release?.version ??
|
||||
status?.currentVersion)
|
||||
: status?.currentVersion;
|
||||
|
||||
this.matDialog.open(AppUpdateReleaseNotesDialogComponent, {
|
||||
autoFocus: false,
|
||||
data: {
|
||||
...(!isUpdateRelease ? { fallbackToLatest: true } : {}),
|
||||
initialVersion:
|
||||
status?.latestVersion ??
|
||||
status?.release?.version ??
|
||||
status?.currentVersion,
|
||||
initialVersion: initialReleaseNotesVersion,
|
||||
},
|
||||
maxWidth: 'calc(100vw - 32px)',
|
||||
restoreFocus: true,
|
||||
|
||||
Reference in new issue
Block a user