Skip to content

Commit 900517f

Browse files
committed
Cleanup
consistency with trash autoremoval
1 parent ce067f5 commit 900517f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/scripts/bgprocess/models/FeedLoader.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,12 @@ define(['modules/RSSParser', '../../libs/favicon'], function (RSSParser, Favicon
211211
itemsFilter['visited'] = true;
212212
}
213213

214-
214+
const now = Date.now();
215215
items.where(itemsFilter)
216216
.forEach((item) => {
217217
const date = item.get('dateCreated') || item.get('date');
218-
const removalInMs = this.getAutoRemoveTime(this.model) * 24 * 60 * 60 * 1000;
219-
if (date + removalInMs < Date.now()) {
218+
const removalDelayInMs = this.getAutoRemoveTime(this.model) * 24 * 60 * 60 * 1000;
219+
if (now - date > removalDelayInMs) {
220220
item.markAsDeleted();
221221
}
222222
});

0 commit comments

Comments
 (0)