From a56e385531d5f4331504a3d8290079e214f8e3f4 Mon Sep 17 00:00:00 2001 From: Marco Gomiero Date: Mon, 11 Sep 2023 10:47:45 +0200 Subject: [PATCH] Update feed list when deleting old feed items --- .../domain/feed/retriever/FeedRetrieverRepositoryImpl.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shared/src/commonMain/kotlin/com/prof18/feedflow/domain/feed/retriever/FeedRetrieverRepositoryImpl.kt b/shared/src/commonMain/kotlin/com/prof18/feedflow/domain/feed/retriever/FeedRetrieverRepositoryImpl.kt index dacd97be..b272df7b 100644 --- a/shared/src/commonMain/kotlin/com/prof18/feedflow/domain/feed/retriever/FeedRetrieverRepositoryImpl.kt +++ b/shared/src/commonMain/kotlin/com/prof18/feedflow/domain/feed/retriever/FeedRetrieverRepositoryImpl.kt @@ -134,6 +134,7 @@ internal class FeedRetrieverRepositoryImpl( override suspend fun markAllFeedAsRead() { databaseHelper.markAllFeedAsRead() + getFeeds() } @Suppress("MagicNumber") @@ -143,6 +144,7 @@ internal class FeedRetrieverRepositoryImpl( val oneWeekInMillis = (((60 * 60) * 24) * 7) * 1000L val threshold = dateFormatter.currentTimeMillis() - oneWeekInMillis databaseHelper.deleteOldFeedItems(threshold) + getFeeds() } private suspend fun parseFeeds(