Skip to content

Commit

Permalink
Update feed list when deleting old feed items
Browse files Browse the repository at this point in the history
  • Loading branch information
prof18 committed Sep 11, 2023
1 parent e98f8a5 commit a56e385
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ internal class FeedRetrieverRepositoryImpl(

override suspend fun markAllFeedAsRead() {
databaseHelper.markAllFeedAsRead()
getFeeds()
}

@Suppress("MagicNumber")
Expand All @@ -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(
Expand Down

0 comments on commit a56e385

Please sign in to comment.