pull/1753/head^2
kunfei 3 years ago
parent 542a3639fd
commit 3d1dd8a27e
  1. 4
      app/src/main/java/io/legado/app/lib/dialogs/AndroidDialogs.kt
  2. 18
      app/src/main/java/io/legado/app/ui/book/changesource/ChangeBookSourceDialog.kt
  3. 2
      app/src/main/res/values-es-rES/strings.xml
  4. 2
      app/src/main/res/values-ja-rJP/strings.xml
  5. 2
      app/src/main/res/values-pt-rBR/strings.xml
  6. 2
      app/src/main/res/values-zh-rHK/strings.xml
  7. 2
      app/src/main/res/values-zh-rTW/strings.xml
  8. 2
      app/src/main/res/values-zh/strings.xml
  9. 2
      app/src/main/res/values/strings.xml

@ -48,9 +48,9 @@ fun Context.alert(
inline fun Fragment.alert( inline fun Fragment.alert(
titleResource: Int? = null, titleResource: Int? = null,
message: Int? = null, messageResource: Int? = null,
noinline init: (AlertBuilder<DialogInterface>.() -> Unit)? = null noinline init: (AlertBuilder<DialogInterface>.() -> Unit)? = null
) = requireActivity().alert(titleResource, message, init) ) = requireActivity().alert(titleResource, messageResource, init)
fun Context.alert(init: AlertBuilder<AlertDialog>.() -> Unit): AlertDialog = fun Context.alert(init: AlertBuilder<AlertDialog>.() -> Unit): AlertDialog =
AndroidAlertBuilder(this).apply { AndroidAlertBuilder(this).apply {

@ -244,8 +244,22 @@ class ChangeBookSourceDialog() : BaseDialogFragment(R.layout.dialog_book_change_
} }
override fun changeTo(searchBook: SearchBook) { override fun changeTo(searchBook: SearchBook) {
changeSource(searchBook) { if (searchBook.type == callBack?.oldBook?.type) {
dismissAllowingStateLoss() changeSource(searchBook) {
dismissAllowingStateLoss()
}
} else {
alert(
titleResource = R.string.book_type_different,
messageResource = R.string.soure_change_source
) {
okButton {
changeSource(searchBook) {
dismissAllowingStateLoss()
}
}
cancelButton()
}
} }
} }

@ -967,5 +967,7 @@
<string name="cannot_timed_non_playback">非播放状态无法定时</string> <string name="cannot_timed_non_playback">非播放状态无法定时</string>
<string name="all_bookmark">所有书签</string> <string name="all_bookmark">所有书签</string>
<string name="change_source_batch">批量换源</string> <string name="change_source_batch">批量换源</string>
<string name="book_type_different">书籍类型不一样</string>
<string name="soure_change_source">是否确认换源</string>
<!-- string end --> <!-- string end -->
</resources> </resources>

@ -970,5 +970,7 @@
<string name="cannot_timed_non_playback">非播放状态无法定时</string> <string name="cannot_timed_non_playback">非播放状态无法定时</string>
<string name="all_bookmark">所有书签</string> <string name="all_bookmark">所有书签</string>
<string name="change_source_batch">批量换源</string> <string name="change_source_batch">批量换源</string>
<string name="book_type_different">书籍类型不一样</string>
<string name="soure_change_source">是否确认换源</string>
<!-- string end --> <!-- string end -->
</resources> </resources>

@ -970,5 +970,7 @@
<string name="cannot_timed_non_playback">非播放状态无法定时</string> <string name="cannot_timed_non_playback">非播放状态无法定时</string>
<string name="all_bookmark">所有书签</string> <string name="all_bookmark">所有书签</string>
<string name="change_source_batch">批量换源</string> <string name="change_source_batch">批量换源</string>
<string name="book_type_different">书籍类型不一样</string>
<string name="soure_change_source">是否确认换源</string>
<!-- string end --> <!-- string end -->
</resources> </resources>

@ -967,5 +967,7 @@
<string name="cannot_timed_non_playback">非播放状态无法定时</string> <string name="cannot_timed_non_playback">非播放状态无法定时</string>
<string name="all_bookmark">所有书签</string> <string name="all_bookmark">所有书签</string>
<string name="change_source_batch">批量换源</string> <string name="change_source_batch">批量换源</string>
<string name="book_type_different">书籍类型不一样</string>
<string name="soure_change_source">是否确认换源</string>
<!-- string end --> <!-- string end -->
</resources> </resources>

@ -969,5 +969,7 @@
<string name="cannot_timed_non_playback">非播放状态无法定时</string> <string name="cannot_timed_non_playback">非播放状态无法定时</string>
<string name="all_bookmark">所有书签</string> <string name="all_bookmark">所有书签</string>
<string name="change_source_batch">批量换源</string> <string name="change_source_batch">批量换源</string>
<string name="book_type_different">书籍类型不一样</string>
<string name="soure_change_source">是否确认换源</string>
<!-- string end --> <!-- string end -->
</resources> </resources>

@ -969,5 +969,7 @@
<string name="cannot_timed_non_playback">非播放状态无法定时</string> <string name="cannot_timed_non_playback">非播放状态无法定时</string>
<string name="all_bookmark">所有书签</string> <string name="all_bookmark">所有书签</string>
<string name="change_source_batch">批量换源</string> <string name="change_source_batch">批量换源</string>
<string name="book_type_different">书籍类型不一样</string>
<string name="soure_change_source">是否确认换源</string>
<!-- string end --> <!-- string end -->
</resources> </resources>

@ -970,5 +970,7 @@
<string name="cannot_timed_non_playback">非播放状态无法定时</string> <string name="cannot_timed_non_playback">非播放状态无法定时</string>
<string name="all_bookmark">所有书签</string> <string name="all_bookmark">所有书签</string>
<string name="change_source_batch">批量换源</string> <string name="change_source_batch">批量换源</string>
<string name="book_type_different">书籍类型不一样</string>
<string name="soure_change_source">是否确认换源</string>
<!-- string end --> <!-- string end -->
</resources> </resources>

Loading…
Cancel
Save