From 0827afa19809e511f00ba108ece73ab4f62c44d0 Mon Sep 17 00:00:00 2001 From: gedoor Date: Sat, 5 Dec 2020 17:36:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=BA=90=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=E8=AE=A2=E9=98=85=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/legado/app/ui/main/rss/RssFragment.kt | 3 -- .../ui/rss/subscription/SourceSubActivity.kt | 2 ++ .../main/res/layout/activity_source_sub.xml | 29 +++++++++++++++---- app/src/main/res/values-zh-rHK/strings.xml | 1 + app/src/main/res/values-zh-rTW/strings.xml | 1 + app/src/main/res/values-zh/strings.xml | 1 + app/src/main/res/values/strings.xml | 1 + 7 files changed, 30 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/main/rss/RssFragment.kt b/app/src/main/java/io/legado/app/ui/main/rss/RssFragment.kt index 2d944233a..f101ea180 100644 --- a/app/src/main/java/io/legado/app/ui/main/rss/RssFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/rss/RssFragment.kt @@ -4,7 +4,6 @@ import android.os.Bundle import android.view.Menu import android.view.MenuItem import android.view.View -import androidx.core.view.isGone import io.legado.app.App import io.legado.app.R import io.legado.app.base.VMBaseFragment @@ -18,7 +17,6 @@ import io.legado.app.ui.rss.source.edit.RssSourceEditActivity import io.legado.app.ui.rss.source.manage.RssSourceActivity import io.legado.app.ui.rss.source.manage.RssSourceViewModel import io.legado.app.ui.rss.subscription.SourceSubActivity - import io.legado.app.utils.getViewModel import io.legado.app.utils.startActivity import io.legado.app.utils.viewbindingdelegate.viewBinding @@ -69,7 +67,6 @@ class RssFragment : VMBaseFragment(R.layout.fragment_rss), private fun initData() { App.db.rssSourceDao().liveEnabled().observe(viewLifecycleOwner, { - binding.tvEmptyMsg.isGone = it.isNotEmpty() adapter.setItems(it) }) } diff --git a/app/src/main/java/io/legado/app/ui/rss/subscription/SourceSubActivity.kt b/app/src/main/java/io/legado/app/ui/rss/subscription/SourceSubActivity.kt index 11de210fd..2d427177f 100644 --- a/app/src/main/java/io/legado/app/ui/rss/subscription/SourceSubActivity.kt +++ b/app/src/main/java/io/legado/app/ui/rss/subscription/SourceSubActivity.kt @@ -3,6 +3,7 @@ package io.legado.app.ui.rss.subscription import android.os.Bundle import android.view.Menu import android.view.MenuItem +import androidx.core.view.isGone import androidx.lifecycle.LiveData import androidx.recyclerview.widget.ItemTouchHelper import io.legado.app.App @@ -61,6 +62,7 @@ class SourceSubActivity : BaseActivity(), liveData?.removeObservers(this) liveData = App.db.sourceSubDao().observeAll() liveData?.observe(this) { + binding.tvEmptyMsg.isGone = it.isNotEmpty() adapter.setItems(it) } } diff --git a/app/src/main/res/layout/activity_source_sub.xml b/app/src/main/res/layout/activity_source_sub.xml index 94bd366e3..3072b276b 100644 --- a/app/src/main/res/layout/activity_source_sub.xml +++ b/app/src/main/res/layout/activity_source_sub.xml @@ -12,12 +12,31 @@ android:layout_height="wrap_content" app:title="@string/source_subscription" /> - + android:layout_height="match_parent"> + + + + + \ No newline at end of file diff --git a/app/src/main/res/values-zh-rHK/strings.xml b/app/src/main/res/values-zh-rHK/strings.xml index 74816c0d6..fb31543bb 100644 --- a/app/src/main/res/values-zh-rHK/strings.xml +++ b/app/src/main/res/values-zh-rHK/strings.xml @@ -788,5 +788,6 @@ 显示/隐藏 页眉页脚 源订阅 + 添加大佬们提供的源导入地址,添加后点击可导入源 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 834cc11b7..af73f733a 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -789,5 +789,6 @@ 显示/隐藏 页眉页脚 源订阅 + 添加大佬们提供的源导入地址,添加后点击可导入源 diff --git a/app/src/main/res/values-zh/strings.xml b/app/src/main/res/values-zh/strings.xml index c636ffe45..a738cfc3f 100644 --- a/app/src/main/res/values-zh/strings.xml +++ b/app/src/main/res/values-zh/strings.xml @@ -792,5 +792,6 @@ 显示/隐藏 页眉页脚 源订阅 + 添加大佬们提供的源导入地址,添加后点击可导入源 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 194fb98b8..5dfb70881 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -795,5 +795,6 @@ 显示/隐藏 footer header 源订阅 + 添加大佬们提供的源导入地址,添加后点击可导入源