Back out Electron 7.1.1/7.1.2 upgrades

Summary:
Original commit changeset: eddfbb3571c7
Original commit changeset: f7300f527b65

Pains me to do this, but probably our best chance right now to get a release out.

Reviewed By: cekkaewnumchai

Differential Revision: D18687890

fbshipit-source-id: 05d13aca71457ca6dd19f5b45d58158ae223e66f
This commit is contained in:
Pascal Hartig
2019-11-25 10:48:59 -08:00
committed by realpassy
parent adb1cb163b
commit a75a52a25b
10 changed files with 546 additions and 446 deletions

View File

@@ -690,9 +690,8 @@ export function showOpenDialog(store: Store) {
properties: ['openFile'],
filters: [{extensions: ['flipper', 'json', 'txt'], name: 'Flipper files'}],
};
remote.dialog.showOpenDialog(options).then(result => {
const filePaths = result.filePaths;
if (filePaths.length > 0) {
remote.dialog.showOpenDialog(options, (filePaths?: Array<string>) => {
if (filePaths !== undefined && filePaths.length > 0) {
tryCatchReportPlatformFailures(() => {
importFileToStore(filePaths[0], store);
}, `${IMPORT_FLIPPER_TRACE_EVENT}:UI`);
@@ -701,17 +700,14 @@ export function showOpenDialog(store: Store) {
}
export function startFileExport(dispatch: Store['dispatch']) {
electron.remote.dialog
.showSaveDialog(
// @ts-ignore This appears to work but isn't allowed by the types
null,
{
title: 'FlipperExport',
defaultPath: path.join(os.homedir(), 'FlipperExport.flipper'),
},
)
.then(async (result: electron.SaveDialogReturnValue) => {
const file = result.filePath;
electron.remote.dialog.showSaveDialog(
// @ts-ignore This appears to work but isn't allowed by the types
null,
{
title: 'FlipperExport',
defaultPath: path.join(os.homedir(), 'FlipperExport.flipper'),
},
async (file: string) => {
if (!file) {
return;
}
@@ -722,7 +718,8 @@ export function startFileExport(dispatch: Store['dispatch']) {
closeOnFinish: false,
}),
);
});
},
);
}
export function startLinkExport(dispatch: Store['dispatch']) {