Continues -> Continuous

This commit is contained in:
Jobobby04 2021-03-30 20:00:55 -04:00
parent b2cf1266ba
commit d294db3e4e
8 changed files with 12 additions and 12 deletions

View File

@ -359,7 +359,7 @@ object PreferenceKeys {
const val extensionRepos = "extension_repos"
const val cropBordersContinuesVertical = "crop_borders_continues_vertical"
const val cropBordersContinuousVertical = "crop_borders_continues_vertical"
const val landscapeVerticalSeekbar = "pref_show_vert_seekbar_landscape"

View File

@ -473,7 +473,7 @@ class PreferencesHelper(val context: Context) {
fun extensionRepos() = flowPrefs.getStringSet(Keys.extensionRepos, emptySet())
fun cropBordersContinuesVertical() = flowPrefs.getBoolean(Keys.cropBordersContinuesVertical, false)
fun cropBordersContinuousVertical() = flowPrefs.getBoolean(Keys.cropBordersContinuousVertical, false)
fun forceHorizontalSeekbar() = flowPrefs.getBoolean(Keys.forceHorizontalSeekbar, false)

View File

@ -498,7 +498,7 @@ class ReaderActivity : BaseRxActivity<ReaderActivityBinding, ReaderPresenter>()
} else {
// SY -->
if (ReadingModeType.fromPreference(mangaViewer) == ReadingModeType.CONTINUOUS_VERTICAL) {
preferences.cropBordersContinuesVertical().toggle()
preferences.cropBordersContinuousVertical().toggle()
} else {
preferences.cropBordersWebtoon().toggle()
}
@ -507,7 +507,7 @@ class ReaderActivity : BaseRxActivity<ReaderActivityBinding, ReaderPresenter>()
}
}
updateCropBordersShortcut()
listOf(preferences.cropBorders(), preferences.cropBordersWebtoon() /* SY --> */, preferences.cropBordersContinuesVertical()/* SY <-- */)
listOf(preferences.cropBorders(), preferences.cropBordersWebtoon() /* SY --> */, preferences.cropBordersContinuousVertical()/* SY <-- */)
.forEach { pref ->
pref.asFlow()
.onEach { updateCropBordersShortcut() }
@ -728,7 +728,7 @@ class ReaderActivity : BaseRxActivity<ReaderActivityBinding, ReaderPresenter>()
} else {
// SY -->
if (ReadingModeType.fromPreference(mangaViewer) == ReadingModeType.CONTINUOUS_VERTICAL) {
preferences.cropBordersContinuesVertical().get()
preferences.cropBordersContinuousVertical().get()
} else {
preferences.cropBordersWebtoon().get()
}

View File

@ -107,7 +107,7 @@ class ReaderReadingModeSettings @JvmOverloads constructor(context: Context, attr
// SY -->
binding.webtoonPrefsGroup.zoomOutWebtoon.bindToPreference(preferences.webtoonEnableZoomOut())
binding.webtoonPrefsGroup.cropBordersContinuesVertical.bindToPreference(preferences.cropBordersContinuesVertical())
binding.webtoonPrefsGroup.cropBordersContinuousVertical.bindToPreference(preferences.cropBordersContinuousVertical())
binding.webtoonPrefsGroup.pageTransitionsWebtoon.bindToPreference(preferences.pageTransitionsWebtoon())
// SY <--
}

View File

@ -34,7 +34,7 @@ class WebtoonConfig(
var enableZoomOut = false
private set
var continuesCropBorders = false
var continuousCropBorders = false
private set
var zoomPropertyChangedListener: ((Boolean) -> Unit)? = null
@ -67,8 +67,8 @@ class WebtoonConfig(
preferences.webtoonEnableZoomOut()
.register({ enableZoomOut = it }, { zoomPropertyChangedListener?.invoke(it) })
preferences.cropBordersContinuesVertical()
.register({ continuesCropBorders = it }, { imagePropertyChangedListener?.invoke() })
preferences.cropBordersContinuousVertical()
.register({ continuousCropBorders = it }, { imagePropertyChangedListener?.invoke() })
preferences.pageTransitionsWebtoon()
.register({ usePageTransitions = it }, { imagePropertyChangedListener?.invoke() })

View File

@ -364,7 +364,7 @@ class WebtoonPageHolder(
val config = viewer.config
// SY -->
val imageCropBorders = if (!viewer.isContinuous) config.continuesCropBorders else config.imageCropBorders
val imageCropBorders = if (!viewer.isContinuous) config.continuousCropBorders else config.imageCropBorders
// SY <--
if (subsamplingImageView != null && /* SY --> */ imageCropBorders /* SY <-- */ == cropBorders) {
return subsamplingImageView!!

View File

@ -333,7 +333,7 @@ class SettingsReaderController : SettingsController() {
defaultValue = false
}
switchPreference {
key = Keys.cropBordersContinuesVertical
key = Keys.cropBordersContinuousVertical
titleRes = R.string.pref_crop_borders
defaultValue = false
}

View File

@ -89,7 +89,7 @@
android:textAppearance="@style/TextAppearance.Medium.SubHeading" />
<com.google.android.material.switchmaterial.SwitchMaterial
android:id="@+id/crop_borders_continues_vertical"
android:id="@+id/crop_borders_continuous_vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="16dp"