From 5d1bdfb5f37f26886ba44c5b7539fec1d696f5a4 Mon Sep 17 00:00:00 2001 From: Ash Date: Wed, 10 Jan 2024 15:36:45 +0800 Subject: [PATCH] fix: fetch feed favicon --- app/proguard-rules.pro | 2 +- .../me/ash/reader/domain/service/AbstractRssRepository.kt | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index f6fd65bbd..1bfe52cd3 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -35,4 +35,4 @@ -keep class com.rometools.** { *; } # Provider API --keep class me.ash.reader.infrastructure.rss.provider.** { *; } +-keep class me.ash.reader.infrastructure.** { *; } diff --git a/app/src/main/java/me/ash/reader/domain/service/AbstractRssRepository.kt b/app/src/main/java/me/ash/reader/domain/service/AbstractRssRepository.kt index 54af4620a..91488ac5e 100644 --- a/app/src/main/java/me/ash/reader/domain/service/AbstractRssRepository.kt +++ b/app/src/main/java/me/ash/reader/domain/service/AbstractRssRepository.kt @@ -147,7 +147,11 @@ abstract class AbstractRssRepository( val latest = articleDao.queryLatestByFeedId(context.currentAccountId, feed.id) val articles = rssHelper.queryRssXml(feed, latest?.link) if (feed.icon == null) { - rssHelper.queryRssIcon(feedDao, feed) + try { + rssHelper.queryRssIcon(feedDao, feed) + } catch (e: Exception) { + Log.i("RLog", "queryRssIcon is failed: ${e.message}") + } } return FeedWithArticle( feed = feed.apply { isNotification = feed.isNotification && articles.isNotEmpty() },