forked from MapComplete/MapComplete
Refactoring: split 'ThemeViewState' into many classes
This commit is contained in:
parent
2b858bd2aa
commit
dbcbf2787d
34 changed files with 1503 additions and 1227 deletions
|
|
@ -46,7 +46,7 @@ export class Changes {
|
|||
|
||||
constructor(
|
||||
state: {
|
||||
featureSwitches: {
|
||||
featureSwitches?: {
|
||||
featureSwitchMorePrivacy?: Store<boolean>
|
||||
featureSwitchIsTesting?: Store<boolean>
|
||||
}
|
||||
|
|
@ -56,8 +56,7 @@ export class Changes {
|
|||
historicalUserLocations?: FeatureSource
|
||||
allElements?: IndexedFeatureSource
|
||||
},
|
||||
leftRightSensitive: boolean = false,
|
||||
reportError?: (string: string | Error, extramessage?: string) => void
|
||||
leftRightSensitive: boolean = false
|
||||
) {
|
||||
this._leftRightSensitive = leftRightSensitive
|
||||
// We keep track of all changes just as well
|
||||
|
|
@ -73,7 +72,7 @@ export class Changes {
|
|||
}
|
||||
this.state = state
|
||||
this.backend = state.osmConnection.Backend()
|
||||
this._reportError = reportError
|
||||
this._reportError = state.reportError
|
||||
this._changesetHandler = new ChangesetHandler(
|
||||
state.featureSwitches?.featureSwitchIsTesting ?? new ImmutableStore(false),
|
||||
state.osmConnection,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue