replace same line if else to when for readability

This commit is contained in:
CarlosEsco 2020-04-22 12:43:55 -04:00
parent 7399c87601
commit 3240260a91

View File

@ -194,8 +194,11 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>(),
return return
} }
NotificationReceiver.dismissNotification(this, manga.hashCode(), Notifications.ID_NEW_CHAPTERS) NotificationReceiver.dismissNotification(this, manga.hashCode(), Notifications.ID_NEW_CHAPTERS)
if (chapter > -1) presenter.init(manga, chapter)
else presenter.init(manga, chapterUrl) when(chapter> -1){
true -> presenter.init(manga, chapter)
false -> presenter.init(manga, chapterUrl)
}
} }
if (savedInstanceState != null) { if (savedInstanceState != null) {