SDA-4482 Auto-update should check value defined in user config (#2098)

This commit is contained in:
Salah Benmoussati 2024-02-21 14:15:05 +01:00 committed by GitHub
parent db0d878747
commit 2ad44b0ef4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 26 additions and 2 deletions

View File

@ -298,6 +298,10 @@ export class AppMenu {
*/
private buildAboutMenu(): Electron.MenuItemConstructorOptions {
logger.info(`app-menu: building about menu`);
const isCorp =
(windowHandler.url &&
windowHandler.url.startsWith('https://corporate.symphony.com')) ||
false;
return {
id: menuSections.about,
label: app.getName(),
@ -320,7 +324,9 @@ export class AppMenu {
isMac &&
!!(
(isAutoUpdateEnabled || forceAutoUpdate) &&
(betaAutoUpdateChannelEnabled || latestAutoUpdateChannelEnabled)
(betaAutoUpdateChannelEnabled ||
latestAutoUpdateChannelEnabled ||
isCorp)
) &&
!!windowHandler.isMana,
label: i18n.t('Check for updates')(),
@ -725,7 +731,9 @@ export class AppMenu {
isWindowsOS &&
!!(
(isAutoUpdateEnabled || forceAutoUpdate) &&
(betaAutoUpdateChannelEnabled || latestAutoUpdateChannelEnabled)
(betaAutoUpdateChannelEnabled ||
latestAutoUpdateChannelEnabled ||
isCorp)
) &&
!!windowHandler.isMana,
label: i18n.t('Check for updates')(),

View File

@ -255,6 +255,16 @@ export class AutoUpdate {
this.finalAutoUpdateChannel = autoUpdateChannel;
this.installVariant = installVariant;
const isCorp =
(windowHandler?.url &&
windowHandler.url.startsWith('https://corporate.symphony.com')) ||
false;
// Corp should keep the ability to get auto-update channel from user config as top prio
if (isCorp && this.finalAutoUpdateChannel !== UpdateChannel.LATEST) {
return;
}
const pmp = config.getFilteredCloudConfigFields([
'sdaInstallerMsiUrlEnabledVisible',
'sdaInstallerMsiUrlBetaEnabledVisible',

View File

@ -1348,6 +1348,7 @@ export const loadBrowserViews = async (
}, 50);
const onMaximizeHandler = () => {
logger.info('window-change: maximizing');
if (!mainView || !viewExists(mainView)) {
return;
}
@ -1361,6 +1362,11 @@ export const loadBrowserViews = async (
) {
return;
}
logger.info(
'window-change: maximizing with bounds ',
currentScreenBounds.width,
currentScreenBounds.height,
);
mainView.setBounds({
width: currentScreenBounds.width,
height: currentScreenBounds.height - TITLE_BAR_HEIGHT,