The removal is primarily to ease the upcoming language refactoring, but it was also never hit anyway, because if the `storedLanguage` is indeed null or undefined (like in the case of a fresh install), the `then` block never runs.
Fortunately, we do still get the effect of "falling back to OS's language", because `selectLanguage` will call `getDefaultLanguage` if `language` is null. While the `language` localStorage remains null, the rest of the code still gets the native language via `selectLanguage`.
Aside: `getDefaultLanguage` uses `navigator.language`. It does seem to grab my OS's locale correctly.
## Issue
Closes 4729: LBRY desktop auto-sets itself as default application for opening html files in Linux file managers like nemo after logout and login or a cold/warm boot
- https://gitlab.freedesktop.org/xdg/xdg-utils/-/issues/180
- It appears that there is a piece of code in xdg that defaults the type to 'text/html' if the parameter is empty. I'm not sure if that's entirely xdg's fault, or it's the way Electron's `setAsDefaultProtocolClient` uses it.
## Changes
In Linux Mint at least, it seems like the `protocols` entry in `electron-builder.json` is enough to associate the LBRY protocol to this app. The extra `setAsDefaultProtocolClient` seems unnecessary.
My test method:
With `setAsDefaultProtocolClient` removed for Linux,
- <a href="lbry://xxx"> still opens the app.
- <a href="lbry://xxx"> does not open the app if the `protocols` entry is removed from `electron-build.json` (confirming that it's doing it's job).
## Issue
Closes 4501 `Font size`
## New behavior
The Desktop app can now zoom the same way as browsers:
- Zoom In: "Ctrl+=" or "Ctrl+numpadPlus" or "Ctrl+WheelUp"
- Zoom Out: "Ctrl+-" or "Ctrl+numpadMinus" or "Ctrl+WheelDown"
- Zoom Reset: "Ctrl+0" or "Ctrl+numpad0"
## Code changes
(1) Electron provides this functionality through the `zoomIn|zoomOut|resetZoom` roles in the Menu, so it would have been a quick job.
However, given that Electron currently does not support having multiple accelerators for one item, we can't add `Ctrl+WheelUp` to the mix and would have to implement our own handler and use `webFrame`.
Given that we need to add code anyways, we handle both keyboard and mouse cases through the same handler, hence the existence of `zoomWindow.js`. It also provides the opportunity to few a few quirks with Electron's default implementation (e.g. stuck at both extremes)
(2) I recall there is another Issue for adding keyboard shortcuts. Given that these shortcuts are universally used in browsers, they are probably "reserved", so shouldn't clash with that task.
CT - Chinese Traditional
CS - Chinese Simplified
Note that if English subsets like en-GB is enabled in the future, the default 'en' value used throughout the code (including in redux.git) needs to be changed to 'en-US'.
Implementation:
- <StatusBar> listens to 'update-target-url' and will show/hide itself as needed.
- Handled the display of "lbry://" protocol.
CSS:
- The colors chosen should work on both Light and Dark Theme.
- The delay is necessary to avoid blinkies when the mouse is moving around.
#4259