replace same line if else to when for readability
This commit is contained in:
parent
7399c87601
commit
3240260a91
1 changed files with 5 additions and 2 deletions
|
@ -194,8 +194,11 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>(),
|
|||
return
|
||||
}
|
||||
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) {
|
||||
|
|
Reference in a new issue