优化
This commit is contained in:
@@ -6,7 +6,6 @@ import androidx.room.Entity
|
||||
import androidx.room.ForeignKey
|
||||
import androidx.room.Ignore
|
||||
import androidx.room.Index
|
||||
import io.legado.app.R
|
||||
import io.legado.app.constant.AppLog
|
||||
import io.legado.app.constant.AppPattern
|
||||
import io.legado.app.data.appDb
|
||||
@@ -138,11 +137,7 @@ data class BookChapter(
|
||||
}
|
||||
}
|
||||
}
|
||||
return when {
|
||||
!isVip -> displayTitle
|
||||
isPay -> appCtx.getString(R.string.payed_title, displayTitle)
|
||||
else -> appCtx.getString(R.string.vip_title, displayTitle)
|
||||
}
|
||||
return displayTitle
|
||||
}
|
||||
|
||||
fun getAbsoluteURL(): String {
|
||||
|
||||
@@ -195,6 +195,8 @@ class BookSourceDebugActivity : VMBaseActivity<ActivitySourceDebugBinding, BookS
|
||||
R.id.menu_content_src -> showDialogFragment(TextDialog("html", viewModel.contentSrc))
|
||||
R.id.menu_refresh_explore -> lifecycleScope.launch {
|
||||
viewModel.bookSource?.clearExploreKindsCache()
|
||||
adapter.clearItems()
|
||||
openOrCloseHelp(true)
|
||||
initExploreKinds()
|
||||
}
|
||||
R.id.menu_help -> showHelp("debugHelp")
|
||||
|
||||
@@ -159,6 +159,12 @@ class ChapterListAdapter(context: Context, val callback: Callback) :
|
||||
tvWordCount.gone()
|
||||
}
|
||||
|
||||
if (item.isVip && !item.isPay) {
|
||||
ivLocked.visible()
|
||||
} else {
|
||||
ivLocked.gone()
|
||||
}
|
||||
|
||||
upHasCache(binding, isDur, cached)
|
||||
} else {
|
||||
tvChapterName.text = getDisplayTitle(item)
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<!-- drawable/lock_outline.xml --><vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:width="24dp" android:viewportWidth="24" android:viewportHeight="24"><path android:fillColor="#000000" android:pathData="M12,17C10.89,17 10,16.1 10,15C10,13.89 10.89,13 12,13A2,2 0 0,1 14,15A2,2 0 0,1 12,17M18,20V10H6V20H18M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V10C4,8.89 4.89,8 6,8H7V6A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,3A3,3 0 0,0 9,6V8H15V6A3,3 0 0,0 12,3Z" /></vector>
|
||||
@@ -9,13 +9,26 @@
|
||||
android:orientation="vertical"
|
||||
android:padding="12dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_locked"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:contentDescription="@string/success"
|
||||
android:paddingEnd="8dp"
|
||||
android:src="@drawable/ic_lock_outline"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:tint="@color/secondaryText" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_chapter_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
app:layout_constraintBottom_toTopOf="@id/barrier"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@+id/iv_locked"
|
||||
app:layout_constraintRight_toLeftOf="@+id/iv_checked"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
@@ -35,7 +48,7 @@
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@+id/iv_locked"
|
||||
app:layout_constraintTop_toBottomOf="@+id/barrier"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user