forked from MapComplete/MapComplete
Feature: image upload now uses the indexedDB-backed queue (formerly known as EmergencyBackup), rework (and simplify) counter logic (fix #2186; fix #1942; helps #2022)
This commit is contained in:
parent
55c015ad84
commit
3d3a72a70a
19 changed files with 402 additions and 503 deletions
|
@ -9,7 +9,6 @@ import ThemeViewStateHashActor from "../../Logic/Web/ThemeViewStateHashActor"
|
|||
import PendingChangesUploader from "../../Logic/Actors/PendingChangesUploader"
|
||||
import { WithGuiState } from "./WithGuiState"
|
||||
import { SpecialVisualizationState } from "../../UI/SpecialVisualization"
|
||||
import EmergencyImageBackup from "../../Logic/ImageProviders/EmergencyImageBackup"
|
||||
|
||||
export class WithImageState extends WithGuiState implements SpecialVisualizationState {
|
||||
readonly imageUploadManager: ImageUploadManager
|
||||
|
@ -30,7 +29,6 @@ export class WithImageState extends WithGuiState implements SpecialVisualization
|
|||
this.osmConnection,
|
||||
this.changes,
|
||||
this.geolocation.geolocationState.currentGPSLocation,
|
||||
this.indexedFeatures,
|
||||
this.reportError
|
||||
)
|
||||
const longAgo = new Date()
|
||||
|
@ -45,7 +43,7 @@ export class WithImageState extends WithGuiState implements SpecialVisualization
|
|||
})
|
||||
|
||||
this.osmConnection.userDetails.addCallbackAndRunD(() => {
|
||||
EmergencyImageBackup.singleton.retryAll(this)
|
||||
this.imageUploadManager.uploadQueue()
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -57,7 +55,7 @@ export class WithImageState extends WithGuiState implements SpecialVisualization
|
|||
featureSwitches: this.featureSwitches,
|
||||
selectedElement: this.selectedElement,
|
||||
indexedFeatures: this.indexedFeatures,
|
||||
guistate: this.guistate,
|
||||
guistate: this.guistate
|
||||
})
|
||||
new PendingChangesUploader(this.changes, this.selectedElement, this.imageUploadManager)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue