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

@ -17,6 +17,11 @@ export default class Constants {
addNewPointWithUnreadMessagesUnlock: 500,
minZoomLevelToAddNewPoints: (Constants.isRetina() ? 18 : 19)
};
/**
* 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;
private static isRetina(): boolean {
if (Utils.runningFromConsole) {