phonegap / phonegap-plugin-contentsync

Download and cache remotely hosted content
Apache License 2.0
206 stars 98 forks source link

sync.cancel(); not working propperly on second cancel() #136

Open dmaus opened 8 years ago

dmaus commented 8 years ago

When canceling the sync process the first time, it works perfectly. Starting the same process again and cancel again, contentsync still downloads the file.

It's easy to reproduce from the sample code. Just put sync.cancel() in the progress-callback and start it two times.

sync.on('progress', function(progress) {
  sync.cancel();
  console.log("Progress event", progress);
  app.setProgress(progress);
});

Only tested on iOS.

mansimarkaur commented 8 years ago

I'd like to work on this as my first contribution. Can you please help me get started with it?

imhotep commented 8 years ago

@mansimarkaur For sure! Fork this repository, make your changes in separate branch and submit a pull request please.