-
-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Delete legacy data from pre-rewrite versions of the app to save disk …
…space
- Loading branch information
1 parent
014a32f
commit 5feb544
Showing
4 changed files
with
44 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,19 +8,22 @@ const {APP_NAME} = require('../brand'); | |
const EMAIL = '[email protected]'; | ||
|
||
class MigrateWindow extends BaseWindow { | ||
static LATEST_VERSION = 2; | ||
static LATEST_VERSION = 3; | ||
|
||
constructor () { | ||
super(); | ||
|
||
const oldDataVersion = settings.dataVersion; | ||
|
||
this.promise = new Promise((resolve) => { | ||
this.resolveCallback = resolve; | ||
}); | ||
|
||
const ipc = this.window.webContents.ipc; | ||
|
||
ipc.on('get-strings', (event) => { | ||
ipc.on('get-info', (event) => { | ||
event.returnValue = { | ||
oldDataVersion, | ||
locale: getLocale(), | ||
strings: getStrings() | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
const {contextBridge, ipcRenderer} = require('electron'); | ||
|
||
contextBridge.exposeInMainWorld('MigratePreload', { | ||
getStrings: () => ipcRenderer.sendSync('get-strings'), | ||
getInfo: () => ipcRenderer.sendSync('get-info'), | ||
done: () => ipcRenderer.invoke('done'), | ||
continueAnyways: () => ipcRenderer.invoke('continue-anyways') | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters