diff --git a/Logic/Actors/PendingChangesUploader.ts b/Logic/Actors/PendingChangesUploader.ts index 2fd038755e..e4a2966067 100644 --- a/Logic/Actors/PendingChangesUploader.ts +++ b/Logic/Actors/PendingChangesUploader.ts @@ -21,38 +21,6 @@ export default class PendingChangesUploader{ }); - selectedFeature - .stabilized(10000) - .addCallback(feature => { - if(feature === undefined){ - // The popup got closed - we flush - changes.flushChanges("Flushing changes due to popup closed"); - } - }); - - document.addEventListener('mouseout', e => { - // @ts-ignore - if (!e.toElement && !e.relatedTarget) { - changes.flushChanges("Flushing changes due to focus lost"); - } - }); - - document.onfocus = () => { - changes.flushChanges("OnFocus") - } - - document.onblur = () => { - changes.flushChanges("OnFocus") - } - try{ - document.addEventListener("visibilitychange", () => { - changes.flushChanges("Visibility change") - }, false); - }catch(e){ - console.warn("Could not register visibility change listener", e) - } - - window.onbeforeunload = function(e){ if(changes.pending.data.length == 0){ diff --git a/Models/Constants.ts b/Models/Constants.ts index 4cbec29302..a5a11c9f2d 100644 --- a/Models/Constants.ts +++ b/Models/Constants.ts @@ -22,7 +22,7 @@ export default class Constants { * Used by 'PendingChangesUploader', which waits this amount of seconds to upload changes. * (Note that pendingChanges might upload sooner if the popup is closed or similar) */ - static updateTimeoutSec: number = 30; + static updateTimeoutSec: number = 180; private static isRetina(): boolean { if (Utils.runningFromConsole) {