pull/1903/head
kunfei 3 years ago
parent cbeba42b36
commit 69c32bb6ff
  1. 4
      app/src/main/java/io/legado/app/ui/about/ReadRecordActivity.kt
  2. 4
      app/src/main/java/io/legado/app/ui/association/FileAssociationActivity.kt
  3. 2
      app/src/main/java/io/legado/app/ui/association/ImportBookSourceDialog.kt
  4. 2
      app/src/main/java/io/legado/app/ui/association/ImportRssSourceDialog.kt
  5. 4
      app/src/main/java/io/legado/app/ui/book/changesource/ChangeChapterSourceDialog.kt
  6. 2
      app/src/main/java/io/legado/app/ui/book/group/GroupEditDialog.kt
  7. 4
      app/src/main/java/io/legado/app/ui/book/search/SearchActivity.kt
  8. 2
      app/src/main/java/io/legado/app/ui/config/ThemeListDialog.kt
  9. 3
      app/src/main/java/io/legado/app/ui/main/bookshelf/BaseBookshelfFragment.kt
  10. 2
      app/src/main/java/io/legado/app/ui/rss/source/manage/RssSourceActivity.kt

@ -68,7 +68,7 @@ class ReadRecordActivity : BaseActivity<ActivityReadRecordBinding>() {
recyclerView.adapter = adapter recyclerView.adapter = adapter
readRecord.tvRemove.setOnClickListener { readRecord.tvRemove.setOnClickListener {
alert(R.string.delete, R.string.sure_del) { alert(R.string.delete, R.string.sure_del) {
okButton { yesButton {
appDb.readRecordDao.clear() appDb.readRecordDao.clear()
initData() initData()
} }
@ -144,7 +144,7 @@ class ReadRecordActivity : BaseActivity<ActivityReadRecordBinding>() {
private fun sureDelAlert(item: ReadRecordShow) { private fun sureDelAlert(item: ReadRecordShow) {
alert(R.string.delete) { alert(R.string.delete) {
setMessage(getString(R.string.sure_del_any, item.bookName)) setMessage(getString(R.string.sure_del_any, item.bookName))
okButton { yesButton {
appDb.readRecordDao.deleteByName(item.bookName) appDb.readRecordDao.deleteByName(item.bookName)
initData() initData()
} }

@ -94,10 +94,10 @@ class FileAssociationActivity :
title = appCtx.getString(R.string.draw), title = appCtx.getString(R.string.draw),
message = appCtx.getString(R.string.file_not_supported, data.second) message = appCtx.getString(R.string.file_not_supported, data.second)
) { ) {
okButton { yesButton {
importBook(data.first) importBook(data.first)
} }
cancelButton { noButton {
finish() finish()
} }
} }

@ -183,7 +183,7 @@ class ImportBookSourceDialog() : BaseDialogFragment(R.layout.dialog_recycler_vie
} }
} }
} }
noButton() cancelButton()
} }
} }

@ -182,7 +182,7 @@ class ImportRssSourceDialog() : BaseDialogFragment(R.layout.dialog_recycler_view
} }
} }
} }
noButton() cancelButton()
} }
} }

@ -79,8 +79,8 @@ class ChangeChapterSourceDialog() : BaseDialogFragment(R.layout.dialog_chapter_c
launch { launch {
alert("搜索结果为空") { alert("搜索结果为空") {
setMessage("${searchGroup}分组搜索结果为空,是否切换到全部分组") setMessage("${searchGroup}分组搜索结果为空,是否切换到全部分组")
cancelButton() noButton()
okButton { yesButton {
AppConfig.searchGroup = "" AppConfig.searchGroup = ""
viewModel.startSearch() viewModel.startSearch()
} }

@ -93,7 +93,7 @@ class GroupEditDialog() : BaseDialogFragment(R.layout.dialog_book_group_edit) {
private fun deleteGroup(ok: () -> Unit) { private fun deleteGroup(ok: () -> Unit) {
alert(R.string.delete, R.string.sure_del) { alert(R.string.delete, R.string.sure_del) {
okButton { yesButton {
ok.invoke() ok.invoke()
} }
noButton() noButton()

@ -72,8 +72,8 @@ class SearchActivity : VMBaseActivity<ActivityBookSearchBinding, SearchViewModel
launch { launch {
alert("搜索结果为空") { alert("搜索结果为空") {
setMessage("${searchGroup}分组搜索结果为空,是否切换到全部分组") setMessage("${searchGroup}分组搜索结果为空,是否切换到全部分组")
cancelButton() noButton()
okButton { yesButton {
AppConfig.searchGroup = "" AppConfig.searchGroup = ""
viewModel.searchKey = "" viewModel.searchKey = ""
viewModel.search(searchView.query.toString()) viewModel.search(searchView.query.toString())

@ -72,7 +72,7 @@ class ThemeListDialog : BaseDialogFragment(R.layout.dialog_recycler_view),
fun delete(index: Int) { fun delete(index: Int) {
alert(R.string.delete, R.string.sure_del) { alert(R.string.delete, R.string.sure_del) {
okButton { yesButton {
ThemeConfig.delConfig(index) ThemeConfig.delConfig(index)
initData() initData()
} }

@ -1,7 +1,6 @@
package io.legado.app.ui.main.bookshelf package io.legado.app.ui.main.bookshelf
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.content.Intent
import android.view.Menu import android.view.Menu
import android.view.MenuItem import android.view.MenuItem
import androidx.fragment.app.activityViewModels import androidx.fragment.app.activityViewModels
@ -166,7 +165,7 @@ abstract class BaseBookshelfFragment(layoutId: Int) : VMBaseFragment<BookshelfVi
} }
} }
} }
noButton() cancelButton()
} }
} }

@ -219,7 +219,7 @@ class RssSourceActivity : VMBaseActivity<ActivityRssSourceBinding, RssSourceView
private fun delSourceDialog() { private fun delSourceDialog() {
alert(titleResource = R.string.draw, messageResource = R.string.sure_del) { alert(titleResource = R.string.draw, messageResource = R.string.sure_del) {
okButton { viewModel.del(*adapter.selection.toTypedArray()) } yesButton { viewModel.del(*adapter.selection.toTypedArray()) }
noButton() noButton()
} }
} }

Loading…
Cancel
Save