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 46b07458f..9e853d1e4 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
@@ -8,6 +8,7 @@ import eu.kanade.tachiyomi.R
* in the file "keys.xml". By using this class we can define preferences in one place and get them
* referenced here.
*/
+@Suppress("HasPlatformType")
class PreferenceKeys(context: Context) {
val theme = context.getString(R.string.pref_theme_key)
@@ -94,6 +95,6 @@ class PreferenceKeys(context: Context) {
fun syncPassword(syncId: Int) = "pref_mangasync_password_$syncId"
- val libraryAsList = context.getString(R.string.pref_display_library_as_list)
+ val libraryAsList = context.getString(R.string.pref_display_library_as_list)
}
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/base/BaseReader.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/base/BaseReader.kt
index 84ddde927..0fb8296ea 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/base/BaseReader.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/base/BaseReader.kt
@@ -16,9 +16,9 @@ abstract class BaseReader : BaseFragment() {
companion object {
/**
- * Rapid decoder.
+ * Image decoder.
*/
- const val RAPID_DECODER = 0
+ const val IMAGE_DECODER = 0
/**
* Skia decoder.
@@ -26,9 +26,9 @@ abstract class BaseReader : BaseFragment() {
const val SKIA_DECODER = 1
/**
- * Image decoder.
+ * Rapid decoder.
*/
- const val IMAGE_DECODER = 2
+ const val RAPID_DECODER = 2
}
/**
@@ -205,17 +205,17 @@ abstract class BaseReader : BaseFragment() {
*/
fun setDecoderClass(value: Int) {
when (value) {
- RAPID_DECODER -> {
- bitmapDecoderClass = RapidImageDecoder::class.java
- regionDecoderClass = RapidImageRegionDecoder::class.java
+ IMAGE_DECODER -> {
+ bitmapDecoderClass = IImageDecoder::class.java
+ regionDecoderClass = IImageRegionDecoder::class.java
}
SKIA_DECODER -> {
bitmapDecoderClass = SkiaImageDecoder::class.java
regionDecoderClass = SkiaImageRegionDecoder::class.java
}
- IMAGE_DECODER -> {
- bitmapDecoderClass = IImageDecoder::class.java
- regionDecoderClass = IImageRegionDecoder::class.java
+ RAPID_DECODER -> {
+ bitmapDecoderClass = RapidImageDecoder::class.java
+ regionDecoderClass = RapidImageRegionDecoder::class.java
}
}
}
diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/preference/SwitchPreferenceCategory.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/preference/SwitchPreferenceCategory.kt
index bf54136f1..e4f3d38b6 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/widget/preference/SwitchPreferenceCategory.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/widget/preference/SwitchPreferenceCategory.kt
@@ -3,7 +3,6 @@ package eu.kanade.tachiyomi.widget.preference
import android.annotation.TargetApi
import android.content.Context
import android.content.res.TypedArray
-import android.os.Build
import android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH
import android.support.v7.preference.PreferenceViewHolder
import android.support.v7.widget.SwitchCompat
@@ -11,7 +10,6 @@ import android.util.AttributeSet
import android.view.View
import android.widget.Checkable
import android.widget.CompoundButton
-import android.widget.Switch
import eu.kanade.tachiyomi.util.getResourceColor
import net.xpece.android.support.preference.PreferenceCategory
import net.xpece.android.support.preference.R
@@ -52,16 +50,12 @@ CompoundButton.OnCheckedChangeListener {
if (view is SwitchCompat) {
view.setOnCheckedChangeListener(null)
- } else if (NATIVE_SWITCH_CAPABLE && view is Switch) {
- view.setOnCheckedChangeListener(null)
}
view.toggle()
if (view is SwitchCompat) {
view.setOnCheckedChangeListener(this)
- } else if (NATIVE_SWITCH_CAPABLE && view is Switch) {
- view.setOnCheckedChangeListener(this)
}
}
}
@@ -130,8 +124,4 @@ CompoundButton.OnCheckedChangeListener {
defaultValue as Boolean)
}
- companion object {
- private val NATIVE_SWITCH_CAPABLE = Build.VERSION.SDK_INT >= ICE_CREAM_SANDWICH
- }
-
}
\ No newline at end of file
diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml
index 6e644174d..1568c1453 100644
--- a/app/src/main/res/values/arrays.xml
+++ b/app/src/main/res/values/arrays.xml
@@ -67,9 +67,9 @@
+ - Image
- Rapid
- Skia
- - Image
diff --git a/app/src/main/res/values/keys.xml b/app/src/main/res/values/keys.xml
index 31da7fa4b..626343711 100644
--- a/app/src/main/res/values/keys.xml
+++ b/app/src/main/res/values/keys.xml
@@ -36,7 +36,7 @@
color_filter_value
pref_red_filter_value
pref_reader_theme_key
- pref_image_decoder_key
+ image_decoder
reader_volume_keys
reader_tap
pref_filter_downloaded_key