Fix many compilation warnings

This commit is contained in:
inorichi
2017-10-28 19:12:17 +02:00
parent 827792c4f0
commit 4ae00c80ca
21 changed files with 43 additions and 41 deletions

View File

@@ -84,9 +84,6 @@ class BackupCreateService : IntentService(NAME) {
// Create root object
val root = JsonObject()
// Create information object
val information = JsonObject()
// Create manga array
val mangaEntries = JsonArray()

View File

@@ -317,8 +317,8 @@ class BackupRestoreService : Service() {
manga
}
.filter { it.id != null }
.flatMap { manga ->
chapterFetchObservable(source, manga, chapters)
.flatMap {
chapterFetchObservable(source, it, chapters)
// Convert to the manga that contains new chapters.
.map { manga }
}

View File

@@ -122,7 +122,7 @@ class DownloadService : Service() {
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe({ state -> onNetworkStateChanged(state)
}, { error ->
}, { _ ->
toast(R.string.download_queue_error)
stopSelf()
})

View File

@@ -287,7 +287,7 @@ class Downloader(private val context: Context, private val provider: DownloadPro
}
return pageListObservable
.doOnNext { pages ->
.doOnNext { _ ->
// Delete all temporary (unfinished) files
tmpDir.listFiles()
?.filter { it.name!!.endsWith(".tmp") }
@@ -303,7 +303,7 @@ class Downloader(private val context: Context, private val provider: DownloadPro
// Do when page is downloaded.
.doOnNext { notifier.onProgressChange(download, queue) }
.toList()
.map { pages -> download }
.map { _ -> download }
// Do after download completes
.doOnNext { ensureSuccessfulDownload(download, tmpDir, chapterDirname) }
// If the page list threw, it will resume here