From 66ed7e4882306543c28421f7d14680826d25cb82 Mon Sep 17 00:00:00 2001 From: kunfei Date: Thu, 14 May 2020 19:20:03 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/assets/updateLog.md | 3 +++ app/src/main/java/io/legado/app/help/SourceHelp.kt | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/src/main/assets/updateLog.md b/app/src/main/assets/updateLog.md index 1b9ae3c09..3bc3b2940 100644 --- a/app/src/main/assets/updateLog.md +++ b/app/src/main/assets/updateLog.md @@ -3,6 +3,9 @@ * 请关注公众号[开源阅读]()支持我,同时关注合作公众号[小说拾遗](),阅读公众号小编。 * 新公众号[开源阅读]()已启用,[开源阅读软件]()备用 +**2020/05/14** +* 导入订阅源是添加18+过滤 + **2020/05/10** * 添加识别rss分组中的频道信息,在菜单中可以切换频道 from yangyxd * 源管理添加置底,批量置顶,批量置地 diff --git a/app/src/main/java/io/legado/app/help/SourceHelp.kt b/app/src/main/java/io/legado/app/help/SourceHelp.kt index bfb1ce104..a995d07b9 100644 --- a/app/src/main/java/io/legado/app/help/SourceHelp.kt +++ b/app/src/main/java/io/legado/app/help/SourceHelp.kt @@ -11,8 +11,12 @@ import org.jetbrains.anko.toast object SourceHelp { private val handler = Handler(Looper.getMainLooper()) - private val list18Plus by lazy { - String(App.INSTANCE.assets.open("18PlusList.txt").readBytes()).splitNotBlank("\n") + private val list18Plus: Array by lazy { + try { + String(App.INSTANCE.assets.open("18PlusList.txt").readBytes()).splitNotBlank("\n") + } catch (e: Exception) { + arrayOf() + } } fun insertRssSource(vararg rssSources: RssSource) {