mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-30 07:04:55 -05:00
Revert "Add option to always use SSIV for image decoding"
This reverts commit bb4d9fc81a
.
This commit is contained in:
parent
36d5ee0763
commit
1909126921
5 changed files with 1 additions and 14 deletions
|
@ -18,7 +18,6 @@ The format is a modified version of [Keep a Changelog](https://keepachangelog.co
|
||||||
- Fixed "currentTab was used multiple times"
|
- Fixed "currentTab was used multiple times"
|
||||||
- Fixed a rare crash when invoking "Mark previous as read" action
|
- Fixed a rare crash when invoking "Mark previous as read" action
|
||||||
- Fixed long strip images not loading in some old devices
|
- Fixed long strip images not loading in some old devices
|
||||||
- Added option to always use SSIV for image decoding
|
|
||||||
|
|
||||||
### Improved
|
### Improved
|
||||||
- Bangumi search now shows the score and summary of a search result ([@MajorTanya](https://github.com/MajorTanya)) ([#1396](https://github.com/mihonapp/mihon/pull/1396))
|
- Bangumi search now shows the score and summary of a search result ([@MajorTanya](https://github.com/MajorTanya)) ([#1396](https://github.com/mihonapp/mihon/pull/1396))
|
||||||
|
|
|
@ -30,6 +30,4 @@ class BasePreferences(
|
||||||
}
|
}
|
||||||
|
|
||||||
fun displayProfile() = preferenceStore.getString("pref_display_profile_key", "")
|
fun displayProfile() = preferenceStore.getString("pref_display_profile_key", "")
|
||||||
|
|
||||||
fun alwaysUseSSIVToDecode() = preferenceStore.getBoolean("pref_always_use_ssiv_to_decode", false)
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -341,10 +341,6 @@ object SettingsAdvancedScreen : SearchableSettings {
|
||||||
chooseColorProfile.launch(arrayOf("*/*"))
|
chooseColorProfile.launch(arrayOf("*/*"))
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
Preference.PreferenceItem.SwitchPreference(
|
|
||||||
pref = basePreferences.alwaysUseSSIVToDecode(),
|
|
||||||
title = stringResource(MR.strings.pref_always_use_ssiv_to_decode),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,6 @@ import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView.EASE_IN_OUT
|
||||||
import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView.EASE_OUT_QUAD
|
import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView.EASE_OUT_QUAD
|
||||||
import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView.SCALE_TYPE_CENTER_INSIDE
|
import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView.SCALE_TYPE_CENTER_INSIDE
|
||||||
import com.github.chrisbanes.photoview.PhotoView
|
import com.github.chrisbanes.photoview.PhotoView
|
||||||
import eu.kanade.domain.base.BasePreferences
|
|
||||||
import eu.kanade.tachiyomi.data.coil.cropBorders
|
import eu.kanade.tachiyomi.data.coil.cropBorders
|
||||||
import eu.kanade.tachiyomi.data.coil.customDecoder
|
import eu.kanade.tachiyomi.data.coil.customDecoder
|
||||||
import eu.kanade.tachiyomi.ui.reader.viewer.webtoon.WebtoonSubsamplingImageView
|
import eu.kanade.tachiyomi.ui.reader.viewer.webtoon.WebtoonSubsamplingImageView
|
||||||
|
@ -42,8 +41,6 @@ import eu.kanade.tachiyomi.util.system.animatorDurationScale
|
||||||
import eu.kanade.tachiyomi.util.view.isVisibleOnScreen
|
import eu.kanade.tachiyomi.util.view.isVisibleOnScreen
|
||||||
import okio.BufferedSource
|
import okio.BufferedSource
|
||||||
import tachiyomi.core.common.util.system.ImageUtil
|
import tachiyomi.core.common.util.system.ImageUtil
|
||||||
import uy.kohesive.injekt.Injekt
|
|
||||||
import uy.kohesive.injekt.api.get
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A wrapper view for showing page image.
|
* A wrapper view for showing page image.
|
||||||
|
@ -61,8 +58,6 @@ open class ReaderPageImageView @JvmOverloads constructor(
|
||||||
private val isWebtoon: Boolean = false,
|
private val isWebtoon: Boolean = false,
|
||||||
) : FrameLayout(context, attrs, defStyleAttrs, defStyleRes) {
|
) : FrameLayout(context, attrs, defStyleAttrs, defStyleRes) {
|
||||||
|
|
||||||
private val alwaysUseSSIVToDecode by lazy { Injekt.get<BasePreferences>().alwaysUseSSIVToDecode().get() }
|
|
||||||
|
|
||||||
private var pageView: View? = null
|
private var pageView: View? = null
|
||||||
|
|
||||||
private var config: Config? = null
|
private var config: Config? = null
|
||||||
|
@ -300,7 +295,7 @@ open class ReaderPageImageView @JvmOverloads constructor(
|
||||||
isVisible = true
|
isVisible = true
|
||||||
}
|
}
|
||||||
is BufferedSource -> {
|
is BufferedSource -> {
|
||||||
if (alwaysUseSSIVToDecode || !isWebtoon || !ImageUtil.canUseCoilToDecode(data)) {
|
if (!isWebtoon || !ImageUtil.canUseCoilToDecode(data)) {
|
||||||
setImage(ImageSource.inputStream(data.inputStream()))
|
setImage(ImageSource.inputStream(data.inputStream()))
|
||||||
isVisible = true
|
isVisible = true
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -392,7 +392,6 @@
|
||||||
<string name="pref_show_reading_mode">Show reading mode</string>
|
<string name="pref_show_reading_mode">Show reading mode</string>
|
||||||
<string name="pref_show_reading_mode_summary">Briefly show current mode when reader is opened</string>
|
<string name="pref_show_reading_mode_summary">Briefly show current mode when reader is opened</string>
|
||||||
<string name="pref_display_profile">Custom display profile</string>
|
<string name="pref_display_profile">Custom display profile</string>
|
||||||
<string name="pref_always_use_ssiv_to_decode">Always use SSIV to decode long strip images</string>
|
|
||||||
<string name="pref_crop_borders">Crop borders</string>
|
<string name="pref_crop_borders">Crop borders</string>
|
||||||
<string name="pref_custom_brightness">Custom brightness</string>
|
<string name="pref_custom_brightness">Custom brightness</string>
|
||||||
<string name="pref_grayscale">Grayscale</string>
|
<string name="pref_grayscale">Grayscale</string>
|
||||||
|
|
Loading…
Reference in a new issue