feat: 优化代码

pull/97/head
kunfei 5 years ago
parent a3f324aa52
commit dae7fd390c
  1. 4
      app/src/main/java/io/legado/app/ui/book/arrange/ArrangeBookActivity.kt
  2. 2
      app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt
  3. 2
      app/src/main/java/io/legado/app/ui/replacerule/ReplaceRuleActivity.kt
  4. 2
      app/src/main/java/io/legado/app/ui/rss/source/manage/RssSourceActivity.kt
  5. 2
      app/src/main/res/values/strings.xml

@ -141,7 +141,7 @@ class ArrangeBookActivity : VMBaseActivity<ArrangeBookViewModel>(R.layout.activi
override fun onMenuItemClick(item: MenuItem?): Boolean {
when (item?.itemId) {
R.id.menu_del_selection ->
alert(titleResource = R.string.sure, messageResource = R.string.sure_del) {
alert(titleResource = R.string.draw, messageResource = R.string.sure_del) {
okButton { viewModel.deleteBook(*adapter.selectedBooks.toTypedArray()) }
noButton { }
}.show().applyTint()
@ -184,7 +184,7 @@ class ArrangeBookActivity : VMBaseActivity<ArrangeBookViewModel>(R.layout.activi
}
override fun deleteBook(book: Book) {
alert(titleResource = R.string.sure, messageResource = R.string.sure_del) {
alert(titleResource = R.string.draw, messageResource = R.string.sure_del) {
okButton {
viewModel.deleteBook(book)
}

@ -171,7 +171,7 @@ class BookSourceActivity : VMBaseActivity<BookSourceViewModel>(R.layout.activity
override fun onClickMainAction() {
this@BookSourceActivity
.alert(titleResource = R.string.sure, messageResource = R.string.sure_del) {
.alert(titleResource = R.string.draw, messageResource = R.string.sure_del) {
okButton { viewModel.delSelection(adapter.getSelection()) }
noButton { }
}

@ -111,7 +111,7 @@ class ReplaceRuleActivity : VMBaseActivity<ReplaceRuleViewModel>(R.layout.activi
override fun onClickMainAction() {
this@ReplaceRuleActivity
.alert(titleResource = R.string.sure, messageResource = R.string.sure_del) {
.alert(titleResource = R.string.draw, messageResource = R.string.sure_del) {
okButton { viewModel.delSelection(adapter.getSelection()) }
noButton { }
}

@ -159,7 +159,7 @@ class RssSourceActivity : VMBaseActivity<RssSourceViewModel>(R.layout.activity_r
override fun onClickMainAction() {
this@RssSourceActivity
.alert(titleResource = R.string.sure, messageResource = R.string.sure_del) {
.alert(titleResource = R.string.draw, messageResource = R.string.sure_del) {
okButton { viewModel.delSelection(adapter.getSelection()) }
noButton { }
}

@ -24,7 +24,7 @@
<string name="dynamic_click_retry">点击重试</string>
<string name="dynamic_loading">正在加载</string>
<string name="draw">提醒</string>
<string name="edit">编辑</string>
<string name="delete">删除</string>
<string name="replace">替换</string>

Loading…
Cancel
Save