mirror of
https://github.com/mihonapp/mihon.git
synced 2025-06-25 10:37:51 +02:00
Minor cleanup
This commit is contained in:
@ -7,7 +7,7 @@ import eu.kanade.tachiyomi.data.track.kitsu.Kitsu
|
||||
import eu.kanade.tachiyomi.data.track.myanimelist.MyAnimeList
|
||||
import eu.kanade.tachiyomi.data.track.shikimori.Shikimori
|
||||
|
||||
class TrackManager(private val context: Context) {
|
||||
class TrackManager(context: Context) {
|
||||
|
||||
companion object {
|
||||
const val MYANIMELIST = 1
|
||||
|
@ -389,7 +389,7 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>() {
|
||||
RIGHT_TO_LEFT -> R2LPagerViewer(this)
|
||||
VERTICAL -> VerticalPagerViewer(this)
|
||||
WEBTOON -> WebtoonViewer(this)
|
||||
VERTICAL_PLUS -> WebtoonViewer(this, true)
|
||||
VERTICAL_PLUS -> WebtoonViewer(this, isContinuous = false)
|
||||
else -> L2RPagerViewer(this)
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,8 @@ class ReaderSettingsSheet(private val activity: ReaderActivity) : BottomSheetDia
|
||||
viewer.onItemSelectedListener = IgnoreFirstSpinnerListener { position ->
|
||||
activity.presenter.setMangaViewer(position)
|
||||
|
||||
if (activity.presenter.getMangaViewer() == ReaderActivity.WEBTOON || activity.presenter.getMangaViewer() == ReaderActivity.VERTICAL_PLUS) {
|
||||
val mangaViewer = activity.presenter.getMangaViewer()
|
||||
if (mangaViewer == ReaderActivity.WEBTOON || mangaViewer == ReaderActivity.VERTICAL_PLUS) {
|
||||
initWebtoonPreferences()
|
||||
} else {
|
||||
initPagerPreferences()
|
||||
|
@ -125,7 +125,7 @@ class WebtoonPageHolder(
|
||||
|
||||
private fun refreshLayoutParams() {
|
||||
frame.layoutParams = FrameLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT).apply {
|
||||
if (viewer.isVerticalPlus) {
|
||||
if (!viewer.isContinuous) {
|
||||
bottomMargin = 15.dpToPx
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ import timber.log.Timber
|
||||
/**
|
||||
* Implementation of a [BaseViewer] to display pages with a [RecyclerView].
|
||||
*/
|
||||
class WebtoonViewer(val activity: ReaderActivity, val isVerticalPlus: Boolean = false) : BaseViewer {
|
||||
class WebtoonViewer(val activity: ReaderActivity, val isContinuous: Boolean = true) : BaseViewer {
|
||||
|
||||
/**
|
||||
* Recycler view used by this viewer.
|
||||
|
Reference in New Issue
Block a user