mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Merge pull request #2156 from omnivore-app/fix/android-0.6-updates
Android 0.60 updates
This commit is contained in:
commit
381293e0b5
16 changed files with 16 additions and 10 deletions
|
|
@ -17,8 +17,8 @@ android {
|
|||
applicationId "app.omnivore.omnivore"
|
||||
minSdk 26
|
||||
targetSdk 33
|
||||
versionCode 52
|
||||
versionName "0.0.52"
|
||||
versionCode 60
|
||||
versionName "0.0.60"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -189,7 +189,7 @@ fun LabelsSelectionSheetContent(
|
|||
Text(titleText, fontWeight = FontWeight.ExtraBold)
|
||||
|
||||
TextButton(onClick = { onSave(selectedLabels.value) }) {
|
||||
Text(text = "Save")
|
||||
Text(text = if (isLibraryMode) "Search" else "Save")
|
||||
}
|
||||
}
|
||||
LazyColumn(
|
||||
|
|
|
|||
|
|
@ -15,6 +15,9 @@ enum class WebFont(val displayText: String, val rawValue: String) {
|
|||
ROBOTO("Roboto", "Roboto"),
|
||||
CRIMSON_TEXT("Crimson Text", "Crimson Text"),
|
||||
SOURCE_SERIF_PRO("Source Serif Pro", "Source Serif Pro"),
|
||||
NEWSREADER("Newsreader", "Newsreader"),
|
||||
LXGWWENKAI("LXGW WenKai", "LXGWWenKai"),
|
||||
ATKINSON_HYPERLEGIBLE("Atkinson Hyperlegible", "AtkinsonHyperlegible"),
|
||||
}
|
||||
|
||||
enum class ArticleContentStatus(val rawValue: String) {
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ class WebReaderViewModel @Inject constructor(
|
|||
|
||||
val storedFontFamily = datastoreRepo.getString(DatastoreKeys.preferredWebFontFamily) ?: WebFont.SYSTEM.rawValue
|
||||
val storedThemePreference = datastoreRepo.getString(DatastoreKeys.preferredTheme) ?: "System"
|
||||
val storedWebFont = WebFont.values().first { it.rawValue == storedFontFamily }
|
||||
val storedWebFont = WebFont.values().firstOrNull { it.rawValue == storedFontFamily } ?: WebFont.values().first()
|
||||
|
||||
val prefersHighContrastFont = datastoreRepo.getString(DatastoreKeys.prefersWebHighContrastText) == "true"
|
||||
val prefersJustifyText = datastoreRepo.getString(DatastoreKeys.prefersJustifyText) == "true"
|
||||
|
|
@ -290,13 +290,13 @@ class WebReaderViewModel @Inject constructor(
|
|||
|
||||
fun updateStoredThemePreference(index: Int, isDarkMode: Boolean) {
|
||||
val newThemeKey = themeKey(isDarkMode, systemThemeKeys[index])
|
||||
Log.d("theme", "Setting theme key: ${newThemeKey}")
|
||||
|
||||
runBlocking {
|
||||
datastoreRepo.putString(DatastoreKeys.preferredTheme, systemThemeKeys[index])
|
||||
}
|
||||
|
||||
val isDark = newThemeKey == "Dark" || newThemeKey == "Black"
|
||||
val script = "var event = new Event('updateColorMode');event.isDark = '$isDark';document.dispatchEvent(event);"
|
||||
val script = "var event = new Event('updateTheme');event.themeName = '$newThemeKey';document.dispatchEvent(event);"
|
||||
enqueueScript(script)
|
||||
}
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -288,6 +288,9 @@ const blackThemeSpec = {
|
|||
}
|
||||
|
||||
const sepiaThemeSpec = {
|
||||
colorScheme: {
|
||||
colorScheme: 'light',
|
||||
},
|
||||
colors: {
|
||||
readerBg: '#FBF0D9',
|
||||
readerFont: '#5F4B32',
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ export function updateThemeLocally(themeId: string): void {
|
|||
window.localStorage.setItem(themeKey, themeId)
|
||||
}
|
||||
|
||||
document.body.classList.remove(
|
||||
document.documentElement.classList.remove(
|
||||
...Object.keys(LEGACY_THEMES),
|
||||
sepiaTheme,
|
||||
darkTheme,
|
||||
|
|
@ -52,7 +52,7 @@ export function updateThemeLocally(themeId: string): void {
|
|||
blackTheme,
|
||||
...Object.keys(ThemeId)
|
||||
)
|
||||
document.body.classList.add(getTheme(themeId))
|
||||
document.documentElement.classList.add(getTheme(themeId))
|
||||
}
|
||||
|
||||
export function currentThemeName(): string {
|
||||
|
|
|
|||
Loading…
Reference in a new issue