chore: rename last local feed refresh time variable name for clarity

This commit is contained in:
Bnyro
2025-05-07 20:56:39 +02:00
parent d5badda345
commit 54cf71740d
2 changed files with 3 additions and 3 deletions

View File

@ -112,7 +112,7 @@ object PreferenceKeys {
const val SELECTED_FEED_FILTERS = "filter_feed"
const val FEED_SORT_ORDER = "sort_oder_feed"
const val LOCAL_FEED_EXTRACTION = "local_feed_extraction"
const val LAST_FEED_REFRESH_TIMESTAMP_MILLIS = "last_feed_refresh_timestamp_millis"
const val LAST_LOCAL_FEED_REFRESH_TIMESTAMP_MILLIS = "last_feed_refresh_timestamp_millis"
// Advanced
const val AUTOMATIC_UPDATE_CHECKS = "automatic_update_checks"

View File

@ -60,7 +60,7 @@ class LocalFeedRepository : FeedRepository {
// only refresh if feed is empty or last refresh was more than a day ago
val lastRefreshMillis =
PreferenceHelper.getLong(PreferenceKeys.LAST_FEED_REFRESH_TIMESTAMP_MILLIS, 0)
PreferenceHelper.getLong(PreferenceKeys.LAST_LOCAL_FEED_REFRESH_TIMESTAMP_MILLIS, 0)
if (feed.isNotEmpty() && lastRefreshMillis > oneDayAgo) {
return DatabaseHolder.Database.feedDao().getAll()
.map(SubscriptionsFeedItem::toStreamItem)
@ -69,7 +69,7 @@ class LocalFeedRepository : FeedRepository {
DatabaseHolder.Database.feedDao().cleanUpOlderThan(minimumDateMillis)
refreshFeed(channelIds, minimumDateMillis, onProgressUpdate)
PreferenceHelper.putLong(PreferenceKeys.LAST_FEED_REFRESH_TIMESTAMP_MILLIS, nowMillis)
PreferenceHelper.putLong(PreferenceKeys.LAST_LOCAL_FEED_REFRESH_TIMESTAMP_MILLIS, nowMillis)
return DatabaseHolder.Database.feedDao().getAll().map(SubscriptionsFeedItem::toStreamItem)
}