forked from MapComplete/MapComplete
Feature(offline): better support for making changes while offline
This commit is contained in:
parent
f671cd342f
commit
7155cd7f61
8 changed files with 89 additions and 10 deletions
|
|
@ -19,6 +19,7 @@ import MarkdownUtils from "../../Utils/MarkdownUtils"
|
|||
import FeaturePropertiesStore from "../FeatureSource/Actors/FeaturePropertiesStore"
|
||||
import { Feature, Point } from "geojson"
|
||||
import { Lists } from "../../Utils/Lists"
|
||||
import { IsOnline } from "../Web/IsOnline"
|
||||
|
||||
/**
|
||||
* Handles all changes made to OSM.
|
||||
|
|
@ -287,6 +288,10 @@ export class Changes {
|
|||
if (this.pendingChanges.data.length === 0) {
|
||||
return
|
||||
}
|
||||
if(!IsOnline.isOnline.data){
|
||||
// No use to upload, we aren't connected anyway
|
||||
return
|
||||
}
|
||||
if (this.isUploading.data) {
|
||||
console.log("Is already uploading... Abort")
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue