Update cordova launcher, remove unnecessary code

This commit is contained in:
Alex Shpak 2019-12-16 22:37:42 +01:00
parent bc1d6ce5d8
commit a80061d97f
3 changed files with 7 additions and 16 deletions

View File

@ -3,7 +3,7 @@ let Launcher;
if (window.process && window.process.versions && window.process.versions.electron) {
Launcher = require('./launcher-electron').Launcher;
} else if (window.cordova) {
// Launcher = require('./launcher-cordova').Launcher; // commented out, while we don't support cordova
Launcher = require('./launcher-cordova').Launcher;
}
export { Launcher };

View File

@ -4,7 +4,7 @@ import { Events } from 'framework/events';
const Launcher = {
name: 'cordova',
version: '6.0.0',
version: window.cordova.platformVersion,
autoTypeSupported: false,
thirdPartyStoragesSupported: false,
clipboardSupported: false,
@ -25,7 +25,7 @@ const Launcher = {
window.open(href, '_system');
},
devTools: false,
// openDevTools: function() { },
openDevTools() {},
getSaveFileName(defaultPath, callback) {
/* skip in cordova */
},
@ -181,8 +181,7 @@ const Launcher = {
createFsWatcher(path) {
return null; // not in android with content provider
},
// ensureRunnable: function(path) { },
ensureRunnable(path) {},
preventExit(e) {
e.returnValue = false;
return false;
@ -190,7 +189,6 @@ const Launcher = {
exit() {
this.hideApp();
},
requestExit() {
/* skip in cordova */
},
@ -200,11 +198,9 @@ const Launcher = {
cancelRestart() {
/* skip in cordova */
},
setClipboardText(text) {},
getClipboardText() {},
clearClipboardText() {},
minimizeApp() {
this.hideApp();
},
@ -217,8 +213,7 @@ const Launcher = {
updaterEnabled() {
return false;
},
// getMainWindow: function() { },
// getMainWindow() {},
resolveProxy(url, callback) {
/* skip in cordova */
},
@ -234,7 +229,7 @@ const Launcher = {
showMainWindow() {
/* skip in cordova */
},
// spawn: function(config) { },
// spawn(config) {},
openFileChooser(callback) {
const onFileSelected = function(selected) {
window.resolveLocalFileSystemURL(selected.uri, fileEntry => {
@ -248,7 +243,7 @@ const Launcher = {
window.cordova.exec(onFileSelected, callback, 'FileChooser', 'choose');
},
setGlobalShortcuts(appSettings) {},
fingerprints: {
config: {
disableBackup: true,

View File

@ -921,10 +921,6 @@ class OpenView extends View {
}
const fileInfo = this.model.fileInfos.get(lastOpenFiles[this.currentSelectedIndex].id);
this.showOpenFileInfo(fileInfo);
if (fileInfo && Launcher && Launcher.fingerprints) {
this.openFileWithFingerprint(fileInfo);
}
}
moveOpenFileSelectionDown() {