feat: 优化代码

pull/133/head
kunfei 5 years ago
parent e2d2f7c8ef
commit 46224dd3c3
  1. 2
      app/src/main/java/io/legado/app/ui/rss/article/RssArticlesActivity.kt
  2. 2
      app/src/main/java/io/legado/app/ui/rss/article/RssArticlesViewModel.kt

@ -60,7 +60,7 @@ class RssArticlesActivity : VMBaseActivity<RssArticlesViewModel>(R.layout.activi
R.id.menu_clear -> { R.id.menu_clear -> {
viewModel.url?.let { viewModel.url?.let {
refresh_progress_bar.isAutoLoading = true refresh_progress_bar.isAutoLoading = true
viewModel.clear() viewModel.clearArticles()
} }
} }
} }

@ -106,7 +106,7 @@ class RssArticlesViewModel(application: Application) : BaseViewModel(application
} }
} }
fun clear() { fun clearArticles() {
execute { execute {
url?.let { url?.let {
App.db.rssArticleDao().delete(it) App.db.rssArticleDao().delete(it)

Loading…
Cancel
Save