chore: automated housekeeping...

This commit is contained in:
Pieter Vander Vennet 2024-08-14 13:53:56 +02:00
parent f77570589d
commit 9b8a9337fd
111 changed files with 2911 additions and 1280 deletions

View file

@ -440,7 +440,13 @@ export class Changes {
}
})
if(!(result.newObjects.length === 0 && result.modifiedObjects.length === 0 && result.deletedObjects.length === 0)) {
if (
!(
result.newObjects.length === 0 &&
result.modifiedObjects.length === 0 &&
result.deletedObjects.length === 0
)
) {
console.debug(
"Calculated the pending changes: ",
result.newObjects.length,
@ -589,7 +595,13 @@ export class Changes {
if (matchFound) {
toUpload.push(c)
} else {
console.log("Refusing change about "+c.type+"/"+ c.id+" as not in the objects. No internet?")
console.log(
"Refusing change about " +
c.type +
"/" +
c.id +
" as not in the objects. No internet?"
)
refused.push(c)
}
})
@ -711,7 +723,7 @@ export class Changes {
let { toUpload, refused } = this.fragmentChanges(pending, objects)
if(toUpload.length === 0){
if (toUpload.length === 0) {
return refused
}
await this._changesetHandler.UploadChangeset(

View file

@ -154,7 +154,7 @@ export class ChangesetHandler {
if (this._reportError) {
this._reportError(e)
}
if((<XMLHttpRequest> e).status === 400){
if ((<XMLHttpRequest>e).status === 400) {
// This request is invalid. We simply drop the changes and hope that someone will analyze what went wrong with it in the upload; we pretend everything went fine
return
}

View file

@ -107,7 +107,8 @@ export class OsmConnection {
ud.name = "Fake user"
ud.totalMessages = 42
ud.languages = ["en"]
ud.description = "The 'fake-user' is a URL-parameter which allows to test features without needing an OSM account or even internet connection."
ud.description =
"The 'fake-user' is a URL-parameter which allows to test features without needing an OSM account or even internet connection."
this.loadingStatus.setData("logged-in")
}
this.UpdateCapabilities()