|
|
@ -141,7 +141,7 @@ class ReadRssActivity : VMBaseActivity<ActivityRssReadBinding, ReadRssViewModel> |
|
|
|
SelectItem(getString(R.string.action_save), "save"), |
|
|
|
SelectItem(getString(R.string.action_save), "save"), |
|
|
|
SelectItem(getString(R.string.select_folder), "selectFolder") |
|
|
|
SelectItem(getString(R.string.select_folder), "selectFolder") |
|
|
|
) |
|
|
|
) |
|
|
|
) { _, charSequence, i -> |
|
|
|
) { _, charSequence, _ -> |
|
|
|
when (charSequence.value) { |
|
|
|
when (charSequence.value) { |
|
|
|
"save" -> saveImage(webPic) |
|
|
|
"save" -> saveImage(webPic) |
|
|
|
"selectFolder" -> selectSaveFolder(null) |
|
|
|
"selectFolder" -> selectSaveFolder(null) |
|
|
@ -219,12 +219,14 @@ class ReadRssActivity : VMBaseActivity<ActivityRssReadBinding, ReadRssViewModel> |
|
|
|
private fun upWebViewTheme() { |
|
|
|
private fun upWebViewTheme() { |
|
|
|
if (AppConfig.isNightTheme) { |
|
|
|
if (AppConfig.isNightTheme) { |
|
|
|
if (WebViewFeature.isFeatureSupported(WebViewFeature.FORCE_DARK_STRATEGY)) { |
|
|
|
if (WebViewFeature.isFeatureSupported(WebViewFeature.FORCE_DARK_STRATEGY)) { |
|
|
|
|
|
|
|
@Suppress("DEPRECATION") |
|
|
|
WebSettingsCompat.setForceDarkStrategy( |
|
|
|
WebSettingsCompat.setForceDarkStrategy( |
|
|
|
binding.webView.settings, |
|
|
|
binding.webView.settings, |
|
|
|
WebSettingsCompat.DARK_STRATEGY_PREFER_WEB_THEME_OVER_USER_AGENT_DARKENING |
|
|
|
WebSettingsCompat.DARK_STRATEGY_PREFER_WEB_THEME_OVER_USER_AGENT_DARKENING |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
if (WebViewFeature.isFeatureSupported(WebViewFeature.FORCE_DARK)) { |
|
|
|
if (WebViewFeature.isFeatureSupported(WebViewFeature.FORCE_DARK)) { |
|
|
|
|
|
|
|
@Suppress("DEPRECATION") |
|
|
|
WebSettingsCompat.setForceDark( |
|
|
|
WebSettingsCompat.setForceDark( |
|
|
|
binding.webView.settings, |
|
|
|
binding.webView.settings, |
|
|
|
WebSettingsCompat.FORCE_DARK_ON |
|
|
|
WebSettingsCompat.FORCE_DARK_ON |
|
|
|