diff --git a/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt b/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt index de1f1d728..2ca4555a3 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt @@ -479,6 +479,8 @@ class ReadBookActivity : VMBaseActivity(R.layout.activity_boo if (!ReadBook.isLocalBook) { tv_chapter_url.text = it.url tv_chapter_url.visible() + } else { + tv_chapter_url.gone() } seek_read_page.max = it.pageSize().minus(1) seek_read_page.progress = ReadBook.durPageIndex diff --git a/app/src/main/java/io/legado/app/utils/ViewExtensions.kt b/app/src/main/java/io/legado/app/utils/ViewExtensions.kt index b8a457325..f0334504e 100644 --- a/app/src/main/java/io/legado/app/utils/ViewExtensions.kt +++ b/app/src/main/java/io/legado/app/utils/ViewExtensions.kt @@ -40,15 +40,21 @@ fun View.disableAutoFill() = run { } fun View.gone() { - visibility = GONE + if (visibility != GONE) { + visibility = GONE + } } fun View.invisible() { - visibility = INVISIBLE + if (visibility != INVISIBLE) { + visibility = INVISIBLE + } } fun View.visible() { - visibility = VISIBLE + if (visibility != VISIBLE) { + visibility = VISIBLE + } } fun View.visible(visible: Boolean) { diff --git a/app/src/main/res/layout/view_read_menu.xml b/app/src/main/res/layout/view_read_menu.xml index 17e2c89f8..135f5b5d9 100644 --- a/app/src/main/res/layout/view_read_menu.xml +++ b/app/src/main/res/layout/view_read_menu.xml @@ -27,7 +27,6 @@ android:paddingLeft="10dp" android:paddingRight="10dp" android:singleLine="true" - android:text="@string/chapter" android:textSize="12sp" android:visibility="gone" /> @@ -38,7 +37,6 @@ android:paddingLeft="10dp" android:paddingRight="10dp" android:singleLine="true" - android:text="@string/chapter" android:textSize="12sp" android:visibility="gone" />