Here is already the function to get the selected package ID from WelcomeWrapper within the contextBridge mechanism which exposes "load" data to the electron main process.
However, it only passes using Kolibri data in the USB storage, or not originally. This patch passes the selected package ID, too. So, electron can tell Kolibri use the correct package by setting the environment variable KOLIBRI_INITIAL_CONTENT_PACK, instead of always the default explorer.
After downloaded the package and restart kolibri-electron.exe, simply passes an empty string as the packId argument of loadKolibriEnv function. It will use what it has in the filesystem which is the content in the USB storage, or the downloaded package.
Here is already the function to get the selected package ID from WelcomeWrapper within the contextBridge mechanism which exposes "load" data to the electron main process.
However, it only passes using Kolibri data in the USB storage, or not originally. This patch passes the selected package ID, too. So, electron can tell Kolibri use the correct package by setting the environment variable KOLIBRI_INITIAL_CONTENT_PACK, instead of always the default explorer.
After downloaded the package and restart kolibri-electron.exe, simply passes an empty string as the packId argument of loadKolibriEnv function. It will use what it has in the filesystem which is the content in the USB storage, or the downloaded package.
https://phabricator.endlessm.com/T34742