mirror of
https://github.com/mihonapp/mihon.git
synced 2025-10-28 12:57:57 +01:00
Comfortable Grid (#3238)
* Comfortable Grid * Add requested changes * Add more requested changes
This commit is contained in:
@@ -73,7 +73,7 @@ object PreferenceKeys {
|
||||
|
||||
const val lastUsedCategory = "last_used_category"
|
||||
|
||||
const val catalogueAsList = "pref_display_catalogue_as_list"
|
||||
const val catalogueDisplayMode = "pref_display_catalogue_display_mode"
|
||||
|
||||
const val enabledLanguages = "source_languages"
|
||||
|
||||
@@ -131,7 +131,7 @@ object PreferenceKeys {
|
||||
|
||||
const val downloadNewCategories = "download_new_categories"
|
||||
|
||||
const val libraryAsList = "pref_display_library_as_list"
|
||||
const val libraryDisplayMode = "pref_display_library_display_mode"
|
||||
|
||||
const val lang = "app_language"
|
||||
|
||||
|
||||
@@ -15,4 +15,8 @@ object PreferenceValues {
|
||||
const val THEME_DARK_DEFAULT = "default"
|
||||
const val THEME_DARK_BLUE = "blue"
|
||||
const val THEME_DARK_AMOLED = "amoled"
|
||||
|
||||
const val DISPLAY_COMPACT_GRID = 0
|
||||
const val DISPLAY_LIST = 1
|
||||
const val DISPLAY_COMFORTABLE_GRID = 2
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import androidx.preference.PreferenceManager
|
||||
import com.tfcporciuncula.flow.FlowSharedPreferences
|
||||
import com.tfcporciuncula.flow.Preference
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.data.preference.PreferenceValues.DISPLAY_COMPACT_GRID
|
||||
import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys
|
||||
import eu.kanade.tachiyomi.data.preference.PreferenceValues as Values
|
||||
import eu.kanade.tachiyomi.data.track.TrackService
|
||||
@@ -138,7 +139,7 @@ class PreferencesHelper(val context: Context) {
|
||||
|
||||
fun lastVersionCode() = flowPrefs.getInt("last_version_code", 0)
|
||||
|
||||
fun catalogueAsList() = flowPrefs.getBoolean(Keys.catalogueAsList, false)
|
||||
fun catalogueDisplayMode() = flowPrefs.getInt(Keys.catalogueDisplayMode, DISPLAY_COMPACT_GRID)
|
||||
|
||||
fun enabledLanguages() = flowPrefs.getStringSet(Keys.enabledLanguages, setOf("en", Locale.getDefault().language))
|
||||
|
||||
@@ -184,7 +185,7 @@ class PreferencesHelper(val context: Context) {
|
||||
|
||||
fun libraryUpdatePrioritization() = flowPrefs.getInt(Keys.libraryUpdatePrioritization, 0)
|
||||
|
||||
fun libraryAsList() = flowPrefs.getBoolean(Keys.libraryAsList, false)
|
||||
fun libraryDisplayMode() = flowPrefs.getInt(Keys.libraryDisplayMode, DISPLAY_COMPACT_GRID)
|
||||
|
||||
fun downloadBadge() = flowPrefs.getBoolean(Keys.downloadBadge, false)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user