换源添加是否校验作者选项

pull/933/head
gedoor 4 years ago
parent eb7b9284ac
commit 84b6fcc6db
  1. 9
      app/src/main/java/io/legado/app/ui/book/changesource/ChangeSourceAdapter.kt
  2. 7
      app/src/main/res/layout/item_change_source.xml

@ -5,7 +5,6 @@ import android.os.Bundle
import android.view.View
import android.view.ViewGroup
import androidx.appcompat.widget.PopupMenu
import androidx.core.view.isGone
import androidx.recyclerview.widget.DiffUtil
import io.legado.app.R
import io.legado.app.base.adapter.DiffRecyclerAdapter
@ -51,13 +50,7 @@ class ChangeSourceAdapter(
binding.apply {
if (bundle == null) {
tvOrigin.text = item.originName
val author = if (item.author.isEmpty()) {
context.getString(R.string.empty)
} else {
item.author
}
tvAuthor.text = context.getString(R.string.author_show, author)
tvAuthor.isGone = viewModel.author == item.author
tvAuthor.text = item.author
tvLast.text = item.getDisplayLastChapterTitle()
if (callBack.bookUrl == item.bookUrl) {
ivChecked.visible()

@ -23,7 +23,6 @@
android:singleLine="true"
android:textColor="@color/primaryText"
android:maxWidth="160dp"
android:visibility="gone"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintRight_toLeftOf="@+id/iv_checked" />
@ -40,9 +39,9 @@
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_checked"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_margin="8dp"
android:layout_width="40dp"
android:layout_height="40dp"
android:padding="8dp"
android:src="@drawable/ic_check"
android:visibility="invisible"
app:tint="@color/primaryText"

Loading…
Cancel
Save