Skip to content

Commit 54cf717

Browse files
committed
chore: rename last local feed refresh time variable name for clarity
1 parent d5badda commit 54cf717

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

app/src/main/java/com/github/libretube/constants/PreferenceKeys.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ object PreferenceKeys {
112112
const val SELECTED_FEED_FILTERS = "filter_feed"
113113
const val FEED_SORT_ORDER = "sort_oder_feed"
114114
const val LOCAL_FEED_EXTRACTION = "local_feed_extraction"
115-
const val LAST_FEED_REFRESH_TIMESTAMP_MILLIS = "last_feed_refresh_timestamp_millis"
115+
const val LAST_LOCAL_FEED_REFRESH_TIMESTAMP_MILLIS = "last_feed_refresh_timestamp_millis"
116116

117117
// Advanced
118118
const val AUTOMATIC_UPDATE_CHECKS = "automatic_update_checks"

app/src/main/java/com/github/libretube/repo/LocalFeedRepository.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class LocalFeedRepository : FeedRepository {
6060

6161
// only refresh if feed is empty or last refresh was more than a day ago
6262
val lastRefreshMillis =
63-
PreferenceHelper.getLong(PreferenceKeys.LAST_FEED_REFRESH_TIMESTAMP_MILLIS, 0)
63+
PreferenceHelper.getLong(PreferenceKeys.LAST_LOCAL_FEED_REFRESH_TIMESTAMP_MILLIS, 0)
6464
if (feed.isNotEmpty() && lastRefreshMillis > oneDayAgo) {
6565
return DatabaseHolder.Database.feedDao().getAll()
6666
.map(SubscriptionsFeedItem::toStreamItem)
@@ -69,7 +69,7 @@ class LocalFeedRepository : FeedRepository {
6969

7070
DatabaseHolder.Database.feedDao().cleanUpOlderThan(minimumDateMillis)
7171
refreshFeed(channelIds, minimumDateMillis, onProgressUpdate)
72-
PreferenceHelper.putLong(PreferenceKeys.LAST_FEED_REFRESH_TIMESTAMP_MILLIS, nowMillis)
72+
PreferenceHelper.putLong(PreferenceKeys.LAST_LOCAL_FEED_REFRESH_TIMESTAMP_MILLIS, nowMillis)
7373

7474
return DatabaseHolder.Database.feedDao().getAll().map(SubscriptionsFeedItem::toStreamItem)
7575
}

0 commit comments

Comments
 (0)