vladimiry / ElectronMail

Unofficial ProtonMail Desktop App
GNU General Public License v3.0
1.5k stars 97 forks source link

How start the app maximized on Mobile/Small screens #402

Closed gjyoung1974 closed 3 years ago

gjyoung1974 commented 3 years ago

How start the app maximized ?

the request here is how to start the app with the window "Toggled" or Maximized if running on mobile/smaller screens.

vladimiry commented 3 years ago

I am porting the packing flow to build artifacts for ARM (Pine Phone specifically)

I guess @Atrate might be interested in exploring your changes (ref: #329).

The second time the app launches, it launches "minimized" which is expected behavior for Desktop environments

To be precise, the app starts hidden not just the second time you launch it, but if the settings.bin file exists in the app settings folder. The settings.bin file gets created when you submit the master password setup form.

On mobile would like the app to start "Maximized" the "Toggle Window" action isn't available on my mobile environment "Phosh"

To disable "hidden" app start, you can manually turn the startHidden flag to false in config.json file located in the app settings folder. There is a respective toggle in the app's "general" settings block.

Btw, starting the app when it's already started should activate/show the hidden app window.

You might also be interested in exploring the hideOnClose and window.maximized flags.

Besides that, in 638580813208314bc48f38712fd3e57dd38da6de I've added support for the following built-time environment variables (remove the config.json file before starting new app build on the device so the file gets created with new defaults):

When you build the app it now will be printing to the consoles the alike message:

Injected environment variables: {
  BUILD_ENVIRONMENT: '"production"',
  BUILD_DISABLE_CLOSE_TO_TRAY_FEATURE: 'false',
  BUILD_DISABLE_START_HIDDEN_FEATURE: '"1"',
  BUILD_START_MAXIMIZED_BY_DEFAULT: '"1"'
}
gjyoung1974 commented 3 years ago

Excellent info @vladimiry Thank you kindly. I will share my changes for Linux > Arm > mobile packaging soon!

gjyoung1974 commented 3 years ago

electronmail4

gjyoung1974 commented 3 years ago

The above guidance works perfectly as evidenced by this screenshot

vladimiry commented 3 years ago

@gjyoung1974 do I get it right that the issue can be closed as resolved?

vladimiry commented 3 years ago

Closing as resolved.