mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-11-25 02:10:32 -06:00
SDA-4482 Auto-update should check value defined in user config (#2098)
This commit is contained in:
parent
db0d878747
commit
2ad44b0ef4
@ -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')(),
|
||||
|
@ -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',
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user