mirror of
https://github.com/smartfrigde/armcord.git
synced 2024-08-14 23:56:58 +00:00
d9d24d9473
* Experiment with two windows * Improve multi-instance behaviour Previously, ArmCord would attempt to launch up a completely new instance each time when multi-instances setting were enabled. This doesn't work well as Electron doesn't support running multiple instances of the same app pointing to the same user data directory (which by default on GNU/Linux is `~/.config/ArmCord`). Doing so would result in this error: > Failed to open LevelDB database" "file currently in use" It's possible to workaround this behaviour by passing in a parameter to a different user data directory when launching subsequent instances of armcord, like so: ```shell $ armcord --user-data-directory=$HOME/.config/ArmCord-2 ``` However, this method ends up taking disk storage in the multiples of the number of armcord instances that are simultaneously running, which isn't ideal. Looking into this more, it looks like Electron can do multiple windows fine with the same user data directory. I gave this a try and it seems to be working nice. With this PR, running any subsequent instances of armcord will open up a new window in the original armcord instance. This should also help with better resource utilization when compared to running multiple full blown instances of armcord. * Fix lints |
||
---|---|---|
.. | ||
main.ts | ||
manager.html | ||
preload.mts |