Initial download manager
This commit is contained in:
@@ -8,11 +8,10 @@ import dagger.Module;
|
||||
import dagger.Provides;
|
||||
import eu.kanade.mangafeed.data.caches.CacheManager;
|
||||
import eu.kanade.mangafeed.data.helpers.DatabaseHelper;
|
||||
import eu.kanade.mangafeed.data.helpers.DownloadManager;
|
||||
import eu.kanade.mangafeed.data.helpers.NetworkHelper;
|
||||
import eu.kanade.mangafeed.data.helpers.PreferencesHelper;
|
||||
import eu.kanade.mangafeed.data.helpers.SourceManager;
|
||||
import rx.Scheduler;
|
||||
import rx.schedulers.Schedulers;
|
||||
|
||||
/**
|
||||
* Provide dependencies to the DataManager, mainly Helper classes and Retrofit services.
|
||||
@@ -32,12 +31,6 @@ public class DataModule {
|
||||
return new DatabaseHelper(app);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
Scheduler provideSubscribeScheduler() {
|
||||
return Schedulers.io();
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
CacheManager provideCacheManager(Application app) {
|
||||
@@ -56,4 +49,10 @@ public class DataModule {
|
||||
return new SourceManager(app);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
DownloadManager provideDownloadManager(Application app, SourceManager sourceManager) {
|
||||
return new DownloadManager(app, sourceManager);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user