mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
优化
This commit is contained in:
@@ -48,9 +48,9 @@ fun Context.alert(
|
||||
|
||||
inline fun Fragment.alert(
|
||||
titleResource: Int? = null,
|
||||
message: Int? = null,
|
||||
messageResource: Int? = 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 =
|
||||
AndroidAlertBuilder(this).apply {
|
||||
|
||||
@@ -244,8 +244,22 @@ class ChangeBookSourceDialog() : BaseDialogFragment(R.layout.dialog_book_change_
|
||||
}
|
||||
|
||||
override fun changeTo(searchBook: SearchBook) {
|
||||
changeSource(searchBook) {
|
||||
dismissAllowingStateLoss()
|
||||
if (searchBook.type == callBack?.oldBook?.type) {
|
||||
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="all_bookmark">所有书签</string>
|
||||
<string name="change_source_batch">批量换源</string>
|
||||
<string name="book_type_different">书籍类型不一样</string>
|
||||
<string name="soure_change_source">是否确认换源</string>
|
||||
<!-- string end -->
|
||||
</resources>
|
||||
|
||||
@@ -970,5 +970,7 @@
|
||||
<string name="cannot_timed_non_playback">非播放状态无法定时</string>
|
||||
<string name="all_bookmark">所有书签</string>
|
||||
<string name="change_source_batch">批量换源</string>
|
||||
<string name="book_type_different">书籍类型不一样</string>
|
||||
<string name="soure_change_source">是否确认换源</string>
|
||||
<!-- string end -->
|
||||
</resources>
|
||||
|
||||
@@ -970,5 +970,7 @@
|
||||
<string name="cannot_timed_non_playback">非播放状态无法定时</string>
|
||||
<string name="all_bookmark">所有书签</string>
|
||||
<string name="change_source_batch">批量换源</string>
|
||||
<string name="book_type_different">书籍类型不一样</string>
|
||||
<string name="soure_change_source">是否确认换源</string>
|
||||
<!-- string end -->
|
||||
</resources>
|
||||
|
||||
@@ -967,5 +967,7 @@
|
||||
<string name="cannot_timed_non_playback">非播放状态无法定时</string>
|
||||
<string name="all_bookmark">所有书签</string>
|
||||
<string name="change_source_batch">批量换源</string>
|
||||
<string name="book_type_different">书籍类型不一样</string>
|
||||
<string name="soure_change_source">是否确认换源</string>
|
||||
<!-- string end -->
|
||||
</resources>
|
||||
|
||||
@@ -969,5 +969,7 @@
|
||||
<string name="cannot_timed_non_playback">非播放状态无法定时</string>
|
||||
<string name="all_bookmark">所有书签</string>
|
||||
<string name="change_source_batch">批量换源</string>
|
||||
<string name="book_type_different">书籍类型不一样</string>
|
||||
<string name="soure_change_source">是否确认换源</string>
|
||||
<!-- string end -->
|
||||
</resources>
|
||||
|
||||
@@ -969,5 +969,7 @@
|
||||
<string name="cannot_timed_non_playback">非播放状态无法定时</string>
|
||||
<string name="all_bookmark">所有书签</string>
|
||||
<string name="change_source_batch">批量换源</string>
|
||||
<string name="book_type_different">书籍类型不一样</string>
|
||||
<string name="soure_change_source">是否确认换源</string>
|
||||
<!-- string end -->
|
||||
</resources>
|
||||
|
||||
@@ -970,5 +970,7 @@
|
||||
<string name="cannot_timed_non_playback">非播放状态无法定时</string>
|
||||
<string name="all_bookmark">所有书签</string>
|
||||
<string name="change_source_batch">批量换源</string>
|
||||
<string name="book_type_different">书籍类型不一样</string>
|
||||
<string name="soure_change_source">是否确认换源</string>
|
||||
<!-- string end -->
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user