replace same line if else to when for readability

pull/3117/head
CarlosEsco 4 years ago
parent 7399c87601
commit 3240260a91

@ -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) {

Loading…
Cancel
Save