mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-10-31 22:37:56 +01:00 
			
		
		
		
	Revert "Add option to always use SSIV for image decoding"
This reverts commit bb4d9fc81a.
			
			
This commit is contained in:
		| @@ -30,6 +30,4 @@ class BasePreferences( | ||||
|     } | ||||
|  | ||||
|     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("*/*")) | ||||
|                     }, | ||||
|                 ), | ||||
|                 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.SCALE_TYPE_CENTER_INSIDE | ||||
| 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.customDecoder | ||||
| 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 okio.BufferedSource | ||||
| 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. | ||||
| @@ -61,8 +58,6 @@ open class ReaderPageImageView @JvmOverloads constructor( | ||||
|     private val isWebtoon: Boolean = false, | ||||
| ) : FrameLayout(context, attrs, defStyleAttrs, defStyleRes) { | ||||
|  | ||||
|     private val alwaysUseSSIVToDecode by lazy { Injekt.get<BasePreferences>().alwaysUseSSIVToDecode().get() } | ||||
|  | ||||
|     private var pageView: View? = null | ||||
|  | ||||
|     private var config: Config? = null | ||||
| @@ -300,7 +295,7 @@ open class ReaderPageImageView @JvmOverloads constructor( | ||||
|                 isVisible = true | ||||
|             } | ||||
|             is BufferedSource -> { | ||||
|                 if (alwaysUseSSIVToDecode || !isWebtoon || !ImageUtil.canUseCoilToDecode(data)) { | ||||
|                 if (!isWebtoon || !ImageUtil.canUseCoilToDecode(data)) { | ||||
|                     setImage(ImageSource.inputStream(data.inputStream())) | ||||
|                     isVisible = true | ||||
|                 } else { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user