diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceKeys.kt b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceKeys.kt index d6fbd5c69b..9a56e98395 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceKeys.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceKeys.kt @@ -49,8 +49,6 @@ object PreferenceKeys { const val cropBordersWebtoon = "crop_borders_webtoon" - const val padPagesVertWebtoon = "pad_pages_vert_webtoon" - const val readWithTapping = "reader_tap" const val readWithLongTap = "reader_long_tap" diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt index 3445d00f36..5306ae302c 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt @@ -107,8 +107,6 @@ class PreferencesHelper(val context: Context) { fun cropBordersWebtoon() = rxPrefs.getBoolean(Keys.cropBordersWebtoon, false) - fun padPagesVertWebtoon() = rxPrefs.getBoolean(Keys.padPagesVertWebtoon, false) - fun readWithTapping() = rxPrefs.getBoolean(Keys.readWithTapping, true) fun readWithLongTap() = rxPrefs.getBoolean(Keys.readWithLongTap, true) 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 f5f2ab204b..b66db4f8d8 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 @@ -123,6 +123,7 @@ class ReaderActivity : BaseRxActivity() { const val RIGHT_TO_LEFT = 2 const val VERTICAL = 3 const val WEBTOON = 4 + const val VERTICAL_PLUS = 5 fun newIntent(context: Context, manga: Manga, chapter: Chapter): Intent { return Intent(context, ReaderActivity::class.java).apply { @@ -388,6 +389,7 @@ class ReaderActivity : BaseRxActivity() { RIGHT_TO_LEFT -> R2LPagerViewer(this) VERTICAL -> VerticalPagerViewer(this) WEBTOON -> WebtoonViewer(this) + VERTICAL_PLUS -> WebtoonViewer(this, true) else -> L2RPagerViewer(this) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderSettingsSheet.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderSettingsSheet.kt index d3fb703c9b..932784f79b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderSettingsSheet.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderSettingsSheet.kt @@ -23,7 +23,6 @@ import kotlinx.android.synthetic.main.reader_settings_sheet.cutout_short import kotlinx.android.synthetic.main.reader_settings_sheet.fullscreen import kotlinx.android.synthetic.main.reader_settings_sheet.keepscreen import kotlinx.android.synthetic.main.reader_settings_sheet.long_tap -import kotlinx.android.synthetic.main.reader_settings_sheet.pad_pages_vert_webtoon import kotlinx.android.synthetic.main.reader_settings_sheet.page_transitions import kotlinx.android.synthetic.main.reader_settings_sheet.pager_prefs_group import kotlinx.android.synthetic.main.reader_settings_sheet.rotation_mode @@ -73,7 +72,7 @@ class ReaderSettingsSheet(private val activity: ReaderActivity) : BottomSheetDia viewer.onItemSelectedListener = IgnoreFirstSpinnerListener { position -> activity.presenter.setMangaViewer(position) - if (activity.presenter.getMangaViewer() == ReaderActivity.WEBTOON) { + if (activity.presenter.getMangaViewer() == ReaderActivity.WEBTOON || activity.presenter.getMangaViewer() == ReaderActivity.VERTICAL_PLUS) { initWebtoonPreferences() } else { initPagerPreferences() @@ -104,7 +103,6 @@ class ReaderSettingsSheet(private val activity: ReaderActivity) : BottomSheetDia scale_type.bindToPreference(preferences.imageScaleType(), 1) zoom_start.bindToPreference(preferences.zoomStart(), 1) crop_borders.bindToPreference(preferences.cropBorders()) - pad_pages_vert_webtoon.bindToPreference(preferences.padPagesVertWebtoon()) page_transitions.bindToPreference(preferences.pageTransitions()) } @@ -116,7 +114,6 @@ class ReaderSettingsSheet(private val activity: ReaderActivity) : BottomSheetDia webtoon_prefs_group.visible() crop_borders_webtoon.bindToPreference(preferences.cropBordersWebtoon()) - pad_pages_vert_webtoon.bindToPreference(preferences.padPagesVertWebtoon()) } /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonConfig.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonConfig.kt index 1e3e291eda..39a25d5b2b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonConfig.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonConfig.kt @@ -31,9 +31,6 @@ class WebtoonConfig(preferences: PreferencesHelper = Injekt.get()) { var imageCropBorders = false private set - var padPagesVert = false - private set - var doubleTapAnimDuration = 500 private set @@ -50,9 +47,6 @@ class WebtoonConfig(preferences: PreferencesHelper = Injekt.get()) { preferences.cropBordersWebtoon() .register({ imageCropBorders = it }, { imagePropertyChangedListener?.invoke() }) - preferences.padPagesVertWebtoon() - .register({ padPagesVert = it }, { imagePropertyChangedListener?.invoke() }) - preferences.doubleTapAnimSpeed() .register({ doubleTapAnimDuration = it }) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonPageHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonPageHolder.kt index 7aeac3bba9..fc3a5650cf 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonPageHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonPageHolder.kt @@ -125,7 +125,7 @@ class WebtoonPageHolder( private fun refreshLayoutParams() { frame.layoutParams = FrameLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT).apply { - if (viewer.config.padPagesVert) { + if (viewer.isVerticalPlus) { bottomMargin = 15.dpToPx } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonViewer.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonViewer.kt index f639b073fb..ee3750d037 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonViewer.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonViewer.kt @@ -22,7 +22,7 @@ import timber.log.Timber /** * Implementation of a [BaseViewer] to display pages with a [RecyclerView]. */ -class WebtoonViewer(val activity: ReaderActivity) : BaseViewer { +class WebtoonViewer(val activity: ReaderActivity, val isVerticalPlus: Boolean = false) : BaseViewer { /** * Recycler view used by this viewer. diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsReaderController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsReaderController.kt index 1176b010ad..05f658dc3d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsReaderController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsReaderController.kt @@ -146,11 +146,6 @@ class SettingsReaderController : SettingsController() { titleRes = R.string.pref_crop_borders defaultValue = false } - switchPreference { - key = Keys.padPagesVertWebtoon - titleRes = R.string.pref_webtoon_padding_vert - defaultValue = false - } } preferenceCategory { diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index 76bd9430ce..d549280a17 100644 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -20,6 +20,7 @@ @string/right_to_left_viewer @string/vertical_viewer @string/webtoon_viewer + @string/vertical_plus_viewer @@ -107,5 +108,4 @@ @string/filter_mode_multiply @string/filter_mode_screen - diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 85c8d7e19f..185ca8279a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -250,6 +250,7 @@ Right to left Vertical Webtoon + Continuous vertical Pager Image decoder Scale type