From 5cc963513a75e34b46656f8612251745d8211bd4 Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Mon, 26 Jul 2021 15:03:07 +0200 Subject: [PATCH] Small optimazations --- Logic/Osm/Changes.ts | 3 ++- Logic/Osm/ChangesetHandler.ts | 3 +++ Logic/UIEventSource.ts | 2 +- Models/Constants.ts | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Logic/Osm/Changes.ts b/Logic/Osm/Changes.ts index 4595d31a4..47d82ec35 100644 --- a/Logic/Osm/Changes.ts +++ b/Logic/Osm/Changes.ts @@ -265,7 +265,7 @@ export class Changes { console.log("No changes to be made") this.pendingChanges.setData([]) this.isUploading.setData(false) - return; + return true; // Unregister the callback } @@ -280,6 +280,7 @@ export class Changes { }, () => self.isUploading.setData(false) // Failed - mark to try again ) + return true; }); diff --git a/Logic/Osm/ChangesetHandler.ts b/Logic/Osm/ChangesetHandler.ts index 8fba43803..8a3845680 100644 --- a/Logic/Osm/ChangesetHandler.ts +++ b/Logic/Osm/ChangesetHandler.ts @@ -53,6 +53,9 @@ export class ChangesetHandler { element.ping(); } + + const newVersion = parseInt(node.attributes.new_id.value); + } } diff --git a/Logic/UIEventSource.ts b/Logic/UIEventSource.ts index 84fa426b6..486d4b6e5 100644 --- a/Logic/UIEventSource.ts +++ b/Logic/UIEventSource.ts @@ -184,7 +184,7 @@ export class UIEventSource { addCallbackAndRunD(callback: (data: T) => void) { this.addCallbackAndRun(data => { if (data !== undefined && data !== null) { - callback(data) + return callback(data) } }) } diff --git a/Models/Constants.ts b/Models/Constants.ts index f3a8be661..7070de141 100644 --- a/Models/Constants.ts +++ b/Models/Constants.ts @@ -2,7 +2,7 @@ import { Utils } from "../Utils"; export default class Constants { - public static vNumber = "0.8.5-rc1"; + public static vNumber = "0.8.5-rc2"; // The user journey states thresholds when a new feature gets unlocked public static userJourney = {