File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ declare const FileTransferManager: any;
1818export class Tab1Page {
1919 uploader : any ;
2020
21+ imagesIds : [ ] ;
2122 images : Map < number , string > = new Map ( ) ;
2223 imageUris : Map < number , string > = new Map ( ) ;
2324 uploadStates : Map < number , UploadState > = new Map ( ) ;
@@ -145,14 +146,14 @@ export class Tab1Page {
145146 }
146147
147148 onTapUploadButton ( ) {
148- for ( const id of this . uploadStates . keys ( ) ) {
149- if ( ! this . uploadStates . has ( id ) ) {
149+ for ( const [ key , value ] of this . images ) {
150+ if ( ! this . uploadStates . has ( key ) ) {
150151 // Start upload
151- this . uploadImage ( id ) ;
152+ this . uploadImage ( key ) ;
152153 } else {
153154 // Remove download
154- const state = this . uploadStates . get ( id ) ;
155- this . uploader . removeUpload ( id , ( res ) => {
155+ const state = this . uploadStates . get ( key ) ;
156+ this . uploader . removeUpload ( key , ( res ) => {
156157 console . log ( 'Remove result:' , res ) ;
157158 this . zone . run ( ( ) => {
158159 state . status = UploadStatus . Aborted ;
You can’t perform that action at this time.
0 commit comments