From 3240260a91c71316a4c756a87a2c409621efb38f Mon Sep 17 00:00:00 2001 From: CarlosEsco Date: Wed, 22 Apr 2020 12:43:55 -0400 Subject: [PATCH] replace same line if else to when for readability --- .../java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt index 441bf35ad1..ef3b98fd9c 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt @@ -194,8 +194,11 @@ class ReaderActivity : BaseRxActivity(), 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) {