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

@ -94,10 +94,10 @@ class FileAssociationActivity :
title = appCtx.getString(R.string.draw),
message = appCtx.getString(R.string.file_not_supported, data.second)
) {
okButton {
yesButton {
importBook(data.first)
}
cancelButton {
noButton {
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 {
alert("搜索结果为空") {
setMessage("${searchGroup}分组搜索结果为空,是否切换到全部分组")
cancelButton()
okButton {
noButton()
yesButton {
AppConfig.searchGroup = ""
viewModel.startSearch()
}

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

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

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

@ -1,7 +1,6 @@
package io.legado.app.ui.main.bookshelf
import android.annotation.SuppressLint
import android.content.Intent
import android.view.Menu
import android.view.MenuItem
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() {
alert(titleResource = R.string.draw, messageResource = R.string.sure_del) {
okButton { viewModel.del(*adapter.selection.toTypedArray()) }
yesButton { viewModel.del(*adapter.selection.toTypedArray()) }
noButton()
}
}

Loading…
Cancel
Save