From ea27400ee0bcdd3f463139c8d22acd240135aaae Mon Sep 17 00:00:00 2001 From: LagradOst <11805592+LagradOst@users.noreply.github.com> Date: Thu, 10 Aug 2023 17:19:17 +0200 Subject: [PATCH] bump + added file for last commit --- app/build.gradle | 4 ++-- .../com/lagradost/quicknovel/ui/ReadingType.kt | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 app/src/main/java/com/lagradost/quicknovel/ui/ReadingType.kt diff --git a/app/build.gradle b/app/build.gradle index fa4e5978..1ed19372 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -14,8 +14,8 @@ android { applicationId "com.lagradost.quicknovel" minSdkVersion 22 targetSdkVersion 33 - versionCode 50 - versionName "3.1.0" + versionCode 51 + versionName "3.1.1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } diff --git a/app/src/main/java/com/lagradost/quicknovel/ui/ReadingType.kt b/app/src/main/java/com/lagradost/quicknovel/ui/ReadingType.kt new file mode 100644 index 00000000..dab8c0b7 --- /dev/null +++ b/app/src/main/java/com/lagradost/quicknovel/ui/ReadingType.kt @@ -0,0 +1,16 @@ +package com.lagradost.quicknovel.ui + +import android.content.pm.ActivityInfo +import androidx.annotation.DrawableRes +import androidx.annotation.StringRes +import com.lagradost.quicknovel.R + +enum class ReadingType(val prefValue: Int, @StringRes val stringRes: Int) { + DEFAULT(0, R.string.default_text), + INF_SCROLL(1, R.string.inf_scroll), + BTT_SCROLL(2, R.string.button_scroll); + + companion object { + fun fromSpinner(position: Int?) = values().find { value -> value.prefValue == position } ?: DEFAULT + } +} \ No newline at end of file