Fullscreen mode (#1968)
* Add preference to open app in full screen * CLI flag for fullscreen and function to return fullscreen state Parsing the config or the args to define how to open the app. Args take priority over the config, and fallback is the window state. * Optional TS config value Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com> * Remove undefined check for `Config.startInFullscreen` * Fixed optional arg for test * Fixed jest test * fullscreen optional window value * Update src/main/windows/mainWindow.ts Co-authored-by: Guillermo Vayá <guivaya@gmail.com> * Update src/main/windows/mainWindow.ts Co-authored-by: Guillermo Vayá <guivaya@gmail.com> * Type fixes Co-authored-by: Mattermod <mattermod@users.noreply.github.com> Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com> Co-authored-by: Guillermo Vayá <guivaya@gmail.com> Co-authored-by: Devin Binnie <devin.binnie@mattermost.com>
This commit is contained in:
@@ -36,6 +36,7 @@ const defaultPreferences: ConfigV3 = {
|
||||
darkMode: false,
|
||||
lastActiveTeam: 0,
|
||||
downloadLocation: getDefaultDownloadLocation(),
|
||||
startInFullscreen: false,
|
||||
};
|
||||
|
||||
export default defaultPreferences;
|
||||
|
@@ -252,6 +252,10 @@ export class Config extends EventEmitter {
|
||||
get enableHardwareAcceleration() {
|
||||
return this.combinedData?.enableHardwareAcceleration ?? defaultPreferences.enableHardwareAcceleration;
|
||||
}
|
||||
|
||||
get startInFullscreen() {
|
||||
return this.combinedData?.startInFullscreen ?? defaultPreferences.startInFullscreen;
|
||||
}
|
||||
get enableServerManagement() {
|
||||
return this.combinedData?.enableServerManagement ?? buildConfig.enableServerManagement;
|
||||
}
|
||||
|
@@ -99,6 +99,7 @@ describe('common/config/upgradePreferences', () => {
|
||||
showUnreadBadge: false,
|
||||
useSpellChecker: false,
|
||||
enableHardwareAcceleration: false,
|
||||
startInFullscreen: false,
|
||||
autostart: false,
|
||||
hideOnStart: false,
|
||||
spellCheckerLocale: 'en-CA',
|
||||
|
@@ -44,6 +44,7 @@ export function upgradeV2toV3(configV2: ConfigV2) {
|
||||
});
|
||||
config.lastActiveTeam = 0;
|
||||
config.spellCheckerLocales = [];
|
||||
config.startInFullscreen = false;
|
||||
return config;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user