mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-11 11:38:56 +01:00
Make default user agent string configurable
This commit is contained in:
@@ -59,6 +59,8 @@ object PreferenceKeys {
|
||||
|
||||
const val dohProvider = "doh_provider"
|
||||
|
||||
const val defaultUserAgent = "default_user_agent"
|
||||
|
||||
const val defaultChapterFilterByRead = "default_chapter_filter_by_read"
|
||||
|
||||
const val defaultChapterFilterByDownloaded = "default_chapter_filter_by_downloaded"
|
||||
|
||||
@@ -294,6 +294,8 @@ class PreferencesHelper(val context: Context) {
|
||||
|
||||
fun dohProvider() = prefs.getInt(Keys.dohProvider, -1)
|
||||
|
||||
fun defaultUserAgent() = flowPrefs.getString(Keys.defaultUserAgent, "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.124 Safari/537.36 Edg/102.0.1245.44")
|
||||
|
||||
fun lastSearchQuerySearchSettings() = flowPrefs.getString("last_search_query", "")
|
||||
|
||||
fun filterChapterByRead() = prefs.getInt(Keys.defaultChapterFilterByRead, DomainManga.SHOW_ALL.toInt())
|
||||
|
||||
Reference in New Issue
Block a user