Address minor Kotlin compiler warnings

This commit is contained in:
Eugene
2019-12-26 17:48:39 -05:00
parent c349fb0e37
commit c339bd49d0
16 changed files with 29 additions and 30 deletions
@@ -119,8 +119,8 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>() {
setContentView(R.layout.reader_activity)
if (presenter.needsInit()) {
val manga = intent.extras.getLong("manga", -1)
val chapter = intent.extras.getLong("chapter", -1)
val manga = intent.extras!!.getLong("manga", -1)
val chapter = intent.extras!!.getLong("chapter", -1)
if (manga == -1L || chapter == -1L) {
finish()
@@ -498,7 +498,7 @@ class ReaderPresenter(
.observeOn(AndroidSchedulers.mainThread())
.subscribeFirst(
{ view, file -> view.onShareImageResult(file) },
{ view, error -> /* Empty */ }
{ _, _ -> /* Empty */ }
)
}
@@ -32,9 +32,9 @@ class DownloadPageLoader(
return downloadManager.buildPageList(source, manga, chapter.chapter)
.map { pages ->
pages.map { page ->
ReaderPage(page.index, page.url, page.imageUrl, {
ReaderPage(page.index, page.url, page.imageUrl) {
context.contentResolver.openInputStream(page.uri)
}).apply {
}.apply {
status = Page.READY
}
}