fix: fix download session modal duplicate string displayed

pull/3205/head
Audric Ackermann 7 months ago
parent f66d725eb5
commit d1f527d573
No known key found for this signature in database

@ -158,7 +158,7 @@ if (windowFromUserConfig) {
import { readFile } from 'fs-extra';
import { getAppRootPath } from '../node/getRootPath';
import { setLastestRelease } from '../node/latest_desktop_release';
import { setLatestRelease } from '../node/latest_desktop_release';
import { isDevProd, isTestIntegration } from '../shared/env_vars';
import { classicDark } from '../themes';
import type { SetupI18nReturnType } from '../types/localizer';
@ -492,7 +492,7 @@ ipc.on('show-window', () => {
});
ipc.on('set-release-from-file-server', (_event, releaseGotFromFileServer) => {
setLastestRelease(releaseGotFromFileServer);
setLatestRelease(releaseGotFromFileServer);
});
let isReadyForUpdates = false;

@ -1,9 +1,9 @@
let latestRelease: string | undefined;
export function setLastestRelease(release: string) {
export function setLatestRelease(release: string) {
latestRelease = release;
}
export function getLastestRelease() {
export function getLatestRelease() {
return latestRelease;
}

@ -27,7 +27,6 @@ export async function showDownloadUpdateDialog(
buttons: [i18n('download'), i18n('later')],
title: i18n('updateSession'),
message: i18n('updateNewVersionDescription'),
detail: i18n('updateNewVersionDescription'),
defaultId: LATER_BUTTON,
cancelId: DOWNLOAD_BUTTON,
};

@ -1,14 +1,15 @@
/* eslint-disable @typescript-eslint/no-misused-promises */
/* eslint-disable no-console */
import * as path from 'path';
import { app, type BrowserWindow } from 'electron';
import { autoUpdater, type UpdateInfo } from 'electron-updater';
import * as fs from 'fs-extra';
import * as path from 'path';
import { gt as isVersionGreaterThan, parse as parseVersion } from 'semver';
import { windowMarkShouldQuit } from '../node/window_state';
import { getLastestRelease } from '../node/latest_desktop_release';
import { getLatestRelease } from '../node/latest_desktop_release';
import type { SetupI18nReturnType } from '../types/localizer';
import {
getPrintableError,
type LoggerType,
@ -16,7 +17,6 @@ import {
showDownloadUpdateDialog,
showUpdateDialog,
} from './common';
import type { SetupI18nReturnType } from '../types/localizer';
let isUpdating = false;
let downloadIgnored = false;
@ -95,7 +95,7 @@ async function checkForUpdates(
isUpdating = true;
try {
const latestVersionFromFsFromRenderer = getLastestRelease();
const latestVersionFromFsFromRenderer = getLatestRelease();
logger.info('[updater] latestVersionFromFsFromRenderer', latestVersionFromFsFromRenderer);
if (!latestVersionFromFsFromRenderer || !latestVersionFromFsFromRenderer?.length) {

Loading…
Cancel
Save