forked from MapComplete/MapComplete
Chore: housekeeping, fix tests
This commit is contained in:
parent
1f67ab2aca
commit
36a73f3a17
50 changed files with 1124 additions and 1022 deletions
|
|
@ -532,7 +532,6 @@ export class Changes {
|
|||
deletedObjects: OsmObject[]
|
||||
} = self.CreateChangesetObjects(pending, objects)
|
||||
|
||||
|
||||
return Changes.createChangesetFor("" + csId, changes)
|
||||
},
|
||||
metatags,
|
||||
|
|
@ -561,8 +560,11 @@ export class Changes {
|
|||
const successes = await Promise.all(
|
||||
Array.from(pendingPerTheme, async ([theme, pendingChanges]) => {
|
||||
try {
|
||||
const openChangeset = UIEventSource.asInt(this.state.osmConnection
|
||||
.GetPreference("current-open-changeset-" + theme))
|
||||
const openChangeset = UIEventSource.asInt(
|
||||
this.state.osmConnection.GetPreference(
|
||||
"current-open-changeset-" + theme
|
||||
)
|
||||
)
|
||||
console.log(
|
||||
"Using current-open-changeset-" +
|
||||
theme +
|
||||
|
|
|
|||
|
|
@ -1,14 +1,17 @@
|
|||
import { UIEventSource } from "../UIEventSource"
|
||||
import UserDetails, { OsmConnection } from "./OsmConnection"
|
||||
import { Utils } from "../../Utils"
|
||||
import { LocalStorageSource } from "../Web/LocalStorageSource";
|
||||
import { LocalStorageSource } from "../Web/LocalStorageSource"
|
||||
|
||||
export class OsmPreferences {
|
||||
/**
|
||||
* A dictionary containing all the preferences. The 'preferenceSources' will be initialized from this
|
||||
* We keep a local copy of them, to init mapcomplete with the previous choices and to be able to get the open changesets right away
|
||||
*/
|
||||
public preferences = LocalStorageSource.GetParsed<Record<string, string>>( "all-osm-preferences", {})
|
||||
public preferences = LocalStorageSource.GetParsed<Record<string, string>>(
|
||||
"all-osm-preferences",
|
||||
{}
|
||||
)
|
||||
private readonly preferenceSources = new Map<string, UIEventSource<string>>()
|
||||
private auth: any
|
||||
private userDetails: UIEventSource<UserDetails>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue