Merge pull request #7943 from vector-im/dbkr/electron_custom_protocol
Electron: Load app from custom protocol
This commit is contained in:
commit
9e085511fd
12 changed files with 544 additions and 7 deletions
|
@ -231,7 +231,16 @@ async function loadApp() {
|
|||
// set the platform for react sdk
|
||||
if (window.ipcRenderer) {
|
||||
console.log("Using Electron platform");
|
||||
PlatformPeg.set(new ElectronPlatform());
|
||||
const plaf = new ElectronPlatform();
|
||||
PlatformPeg.set(plaf);
|
||||
|
||||
// Electron only: see if we need to do a one-time data
|
||||
// migration
|
||||
if (window.localStorage.getItem('mx_user_id') === null) {
|
||||
console.log("Migrating session from old origin...");
|
||||
await plaf.migrateFromOldOrigin();
|
||||
console.log("Origin migration complete");
|
||||
}
|
||||
} else {
|
||||
console.log("Using Web platform");
|
||||
PlatformPeg.set(new WebPlatform());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue