|
|
@ -37,7 +37,7 @@ class ReadRssActivity : VMBaseActivity<ActivityRssReadBinding, ReadRssViewModel> |
|
|
|
|
|
|
|
|
|
|
|
override val binding by viewBinding(ActivityRssReadBinding::inflate) |
|
|
|
override val binding by viewBinding(ActivityRssReadBinding::inflate) |
|
|
|
override val viewModel by viewModels<ReadRssViewModel>() |
|
|
|
override val viewModel by viewModels<ReadRssViewModel>() |
|
|
|
private val imagePathKey = "" |
|
|
|
private val imagePathKey = "imagePath" |
|
|
|
private var starMenuItem: MenuItem? = null |
|
|
|
private var starMenuItem: MenuItem? = null |
|
|
|
private var ttsMenuItem: MenuItem? = null |
|
|
|
private var ttsMenuItem: MenuItem? = null |
|
|
|
private var customWebViewCallback: WebChromeClient.CustomViewCallback? = null |
|
|
|
private var customWebViewCallback: WebChromeClient.CustomViewCallback? = null |
|
|
@ -155,8 +155,16 @@ class ReadRssActivity : VMBaseActivity<ActivityRssReadBinding, ReadRssViewModel> |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private fun saveImage() { |
|
|
|
private fun saveImage() { |
|
|
|
|
|
|
|
val path = ACache.get(this@ReadRssActivity).getAsString(imagePathKey) |
|
|
|
|
|
|
|
if (path.isNullOrEmpty()) { |
|
|
|
|
|
|
|
selectExportFolder() |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
viewModel.saveImage(webPic, path) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
private fun selectExportFolder() { |
|
|
|
val default = arrayListOf<String>() |
|
|
|
val default = arrayListOf<String>() |
|
|
|
val path = ACache.get(this).getAsString(imagePathKey) |
|
|
|
val path = ACache.get(this@ReadRssActivity).getAsString(imagePathKey) |
|
|
|
if (!path.isNullOrEmpty()) { |
|
|
|
if (!path.isNullOrEmpty()) { |
|
|
|
default.add(path) |
|
|
|
default.add(path) |
|
|
|
} |
|
|
|
} |
|
|
|