mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-22 18:11:50 +01:00
Minor cleanup
This commit is contained in:
parent
38ceaf5253
commit
dd59748bf0
@ -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.myanimelist.MyAnimeList
|
||||||
import eu.kanade.tachiyomi.data.track.shikimori.Shikimori
|
import eu.kanade.tachiyomi.data.track.shikimori.Shikimori
|
||||||
|
|
||||||
class TrackManager(private val context: Context) {
|
class TrackManager(context: Context) {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
const val MYANIMELIST = 1
|
const val MYANIMELIST = 1
|
||||||
|
@ -389,7 +389,7 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>() {
|
|||||||
RIGHT_TO_LEFT -> R2LPagerViewer(this)
|
RIGHT_TO_LEFT -> R2LPagerViewer(this)
|
||||||
VERTICAL -> VerticalPagerViewer(this)
|
VERTICAL -> VerticalPagerViewer(this)
|
||||||
WEBTOON -> WebtoonViewer(this)
|
WEBTOON -> WebtoonViewer(this)
|
||||||
VERTICAL_PLUS -> WebtoonViewer(this, true)
|
VERTICAL_PLUS -> WebtoonViewer(this, isContinuous = false)
|
||||||
else -> L2RPagerViewer(this)
|
else -> L2RPagerViewer(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,7 +72,8 @@ class ReaderSettingsSheet(private val activity: ReaderActivity) : BottomSheetDia
|
|||||||
viewer.onItemSelectedListener = IgnoreFirstSpinnerListener { position ->
|
viewer.onItemSelectedListener = IgnoreFirstSpinnerListener { position ->
|
||||||
activity.presenter.setMangaViewer(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()
|
initWebtoonPreferences()
|
||||||
} else {
|
} else {
|
||||||
initPagerPreferences()
|
initPagerPreferences()
|
||||||
|
@ -125,7 +125,7 @@ class WebtoonPageHolder(
|
|||||||
|
|
||||||
private fun refreshLayoutParams() {
|
private fun refreshLayoutParams() {
|
||||||
frame.layoutParams = FrameLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT).apply {
|
frame.layoutParams = FrameLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT).apply {
|
||||||
if (viewer.isVerticalPlus) {
|
if (!viewer.isContinuous) {
|
||||||
bottomMargin = 15.dpToPx
|
bottomMargin = 15.dpToPx
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ import timber.log.Timber
|
|||||||
/**
|
/**
|
||||||
* Implementation of a [BaseViewer] to display pages with a [RecyclerView].
|
* 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.
|
* Recycler view used by this viewer.
|
||||||
|
@ -256,14 +256,6 @@
|
|||||||
android:textColor="?android:attr/textColorSecondary"
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
app:layout_constraintTop_toBottomOf="@id/webtoon_prefs" />
|
app:layout_constraintTop_toBottomOf="@id/webtoon_prefs" />
|
||||||
|
|
||||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
|
||||||
android:id="@+id/pad_pages_vert_webtoon"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/pref_webtoon_padding_vert"
|
|
||||||
android:textColor="?android:attr/textColorSecondary"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/crop_borders_webtoon" />
|
|
||||||
|
|
||||||
<!-- Groups of preferences -->
|
<!-- Groups of preferences -->
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Group
|
<androidx.constraintlayout.widget.Group
|
||||||
@ -279,7 +271,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:constraint_referenced_ids="webtoon_prefs,crop_borders_webtoon,pad_pages_vert_webtoon" />
|
app:constraint_referenced_ids="webtoon_prefs,crop_borders_webtoon" />
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Guideline
|
<androidx.constraintlayout.widget.Guideline
|
||||||
android:id="@+id/verticalcenter"
|
android:id="@+id/verticalcenter"
|
||||||
|
@ -223,7 +223,6 @@
|
|||||||
<string name="pref_show_page_number">Show page number</string>
|
<string name="pref_show_page_number">Show page number</string>
|
||||||
<string name="pref_true_color">32-bit color</string>
|
<string name="pref_true_color">32-bit color</string>
|
||||||
<string name="pref_crop_borders">Crop borders</string>
|
<string name="pref_crop_borders">Crop borders</string>
|
||||||
<string name="pref_webtoon_padding_vert">Vertical padding between pages</string>
|
|
||||||
<string name="pref_custom_brightness">Use custom brightness</string>
|
<string name="pref_custom_brightness">Use custom brightness</string>
|
||||||
<string name="pref_custom_color_filter">Use custom color filter</string>
|
<string name="pref_custom_color_filter">Use custom color filter</string>
|
||||||
<string name="pref_color_filter_mode">Color filter blend mode</string>
|
<string name="pref_color_filter_mode">Color filter blend mode</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user