Only upload changes after 30s, on focus loss or on closing of the popup - this should improve #162 already a lot

This commit is contained in:
Pieter Vander Vennet 2021-02-20 22:18:42 +01:00
parent 3fb2b9adab
commit df483786b3
4 changed files with 88 additions and 7 deletions

View file

@ -18,6 +18,7 @@ import Constants from "./Models/Constants";
import UpdateFromOverpass from "./Logic/Actors/UpdateFromOverpass";
import LayerConfig from "./Customizations/JSON/LayerConfig";
import TitleHandler from "./Logic/Actors/TitleHandler";
import PendingChangesUploader from "./Logic/Actors/PendingChangesUploader";
/**
* Contains the global state: a bunch of UI-event sources
@ -207,6 +208,8 @@ export default class State {
this.allElements = new ElementStorage();
this.changes = new Changes();
new PendingChangesUploader(this.changes, this.selectedElement);
this.mangroveIdentity = new MangroveIdentity(
this.osmConnection.GetLongPreference("identity", "mangrove")