Run default Android Studio formatter on code
This commit is contained in:
@@ -17,9 +17,12 @@ class ChapterItem(val chapter: Chapter, val manga: Manga) : AbstractFlexibleItem
|
||||
|
||||
var status: Int
|
||||
get() = download?.status ?: _status
|
||||
set(value) { _status = value }
|
||||
set(value) {
|
||||
_status = value
|
||||
}
|
||||
|
||||
@Transient var download: Download? = null
|
||||
@Transient
|
||||
var download: Download? = null
|
||||
|
||||
val isDownloaded: Boolean
|
||||
get() = status == Download.DOWNLOADED
|
||||
|
||||
@@ -139,11 +139,11 @@ class ChaptersController : NucleusController<ChaptersPresenter>(),
|
||||
menuFilterDownloaded.isChecked = presenter.onlyDownloaded()
|
||||
menuFilterBookmarked.isChecked = presenter.onlyBookmarked()
|
||||
|
||||
// Disable unread filter option if read filter is enabled.
|
||||
if (presenter.onlyRead())
|
||||
//Disable unread filter option if read filter is enabled.
|
||||
menuFilterUnread.isEnabled = false
|
||||
// Disable read filter option if unread filter is enabled.
|
||||
if (presenter.onlyUnread())
|
||||
//Disable read filter option if unread filter is enabled.
|
||||
menuFilterRead.isEnabled = false
|
||||
|
||||
// Display mode submenu
|
||||
|
||||
@@ -109,8 +109,8 @@ class ChaptersPresenter(
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.filter { download -> download.manga.id == manga.id }
|
||||
.doOnNext { onDownloadStatusChange(it) }
|
||||
.subscribeLatestCache(ChaptersController::onChapterStatusChange) {
|
||||
_, error -> Timber.e(error)
|
||||
.subscribeLatestCache(ChaptersController::onChapterStatusChange) { _, error ->
|
||||
Timber.e(error)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,8 +176,7 @@ class ChaptersPresenter(
|
||||
var observable = Observable.from(chapters).subscribeOn(Schedulers.io())
|
||||
if (onlyUnread()) {
|
||||
observable = observable.filter { !it.read }
|
||||
}
|
||||
else if (onlyRead()) {
|
||||
} else if (onlyRead()) {
|
||||
observable = observable.filter { it.read }
|
||||
}
|
||||
if (onlyDownloaded()) {
|
||||
|
||||
@@ -91,7 +91,7 @@ class MangaInfoController : NucleusController<MangaInfoPresenter>(),
|
||||
fab_favorite.clicks().subscribeUntilDestroy { onFabClick() }
|
||||
|
||||
// Set onLongClickListener to manage categories when FAB is clicked.
|
||||
fab_favorite.longClicks().subscribeUntilDestroy{ onFabLongClick() }
|
||||
fab_favorite.longClicks().subscribeUntilDestroy { onFabLongClick() }
|
||||
|
||||
// Set SwipeRefresh to refresh manga data.
|
||||
swipe_refresh.refreshes().subscribeUntilDestroy { fetchMangaFromSource() }
|
||||
@@ -488,7 +488,7 @@ class MangaInfoController : NucleusController<MangaInfoPresenter>(),
|
||||
activity?.toast(R.string.icon_creation_fail)
|
||||
}
|
||||
|
||||
override fun onLoadCleared(placeholder: Drawable?) { }
|
||||
override fun onLoadCleared(placeholder: Drawable?) {}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ class TrackSearchDialog : DialogController {
|
||||
.onPositive { _, _ -> onPositiveButtonClick() }
|
||||
.negativeText(android.R.string.cancel)
|
||||
.neutralText(R.string.action_remove)
|
||||
.onNeutral { _, _ -> onRemoveButtonClick() }
|
||||
.onNeutral { _, _ -> onRemoveButtonClick() }
|
||||
.build()
|
||||
|
||||
if (subscriptions.isUnsubscribed) {
|
||||
|
||||
Reference in New Issue
Block a user