forked from MapComplete/MapComplete
		
	Feature(offline): don't attempt to upload images if offline
This commit is contained in:
		
							parent
							
								
									7155cd7f61
								
							
						
					
					
						commit
						f1da97285f
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
					@ -16,6 +16,7 @@ import OsmObjectDownloader from "../Osm/OsmObjectDownloader"
 | 
				
			||||||
import ExifReader from "exifreader"
 | 
					import ExifReader from "exifreader"
 | 
				
			||||||
import { Utils } from "../../Utils"
 | 
					import { Utils } from "../../Utils"
 | 
				
			||||||
import { Lists } from "../../Utils/Lists"
 | 
					import { Lists } from "../../Utils/Lists"
 | 
				
			||||||
 | 
					import { IsOnline } from "../Web/IsOnline"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * The ImageUploadManager has a
 | 
					 * The ImageUploadManager has a
 | 
				
			||||||
| 
						 | 
					@ -172,6 +173,9 @@ export class ImageUploadManager {
 | 
				
			||||||
        if (this.uploadingAll) {
 | 
					        if (this.uploadingAll) {
 | 
				
			||||||
            return
 | 
					            return
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        if(!IsOnline.isOnline){
 | 
				
			||||||
 | 
					            return
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        try {
 | 
					        try {
 | 
				
			||||||
            let queue: ImageUploadArguments[]
 | 
					            let queue: ImageUploadArguments[]
 | 
				
			||||||
            const failed: Set<ImageUploadArguments> = new Set()
 | 
					            const failed: Set<ImageUploadArguments> = new Set()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue