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

View File

@ -255,6 +255,16 @@ export class AutoUpdate {
this.finalAutoUpdateChannel = autoUpdateChannel; this.finalAutoUpdateChannel = autoUpdateChannel;
this.installVariant = installVariant; 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([ const pmp = config.getFilteredCloudConfigFields([
'sdaInstallerMsiUrlEnabledVisible', 'sdaInstallerMsiUrlEnabledVisible',
'sdaInstallerMsiUrlBetaEnabledVisible', 'sdaInstallerMsiUrlBetaEnabledVisible',

View File

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