added NativeShell API to localsync module

This commit is contained in:
vitorsemeano 2019-03-16 19:25:46 +00:00
parent e39d364874
commit a77058de61

View File

@ -3,6 +3,10 @@ define(["connectionManager"], function(connectionManager) {
var isSyncing;
return {
sync: function(options) {
if (window.NativeShell) {
return window.NativeShell.sync(options);
}
return console.log("localSync.sync starting..."), isSyncing ? Promise.resolve() : (isSyncing = !0, new Promise(function(resolve, reject) {
require(["multiserversync", "appSettings"], function(MultiServerSync, appSettings) {
options = options || {}, options.cameraUploadServers = appSettings.cameraUploadServers(), (new MultiServerSync).sync(connectionManager, options).then(function() {