Revert "Use date to compare progress items"

This reverts commit cf0125755c.
This commit is contained in:
William Oldham 2023-12-06 19:59:50 +00:00
parent cf0125755c
commit 05bf651939
1 changed files with 4 additions and 3 deletions

View File

@ -100,9 +100,10 @@ export const userProgressRouter = makeRouter((app) => {
if (newItemIndex > -1) {
const newItem = newItems[newItemIndex];
const newItemDate = defaultAndCoerceDateTime(newItem.updatedAt);
if (existingItem.updatedAt.getTime() < newItemDate.getTime()) {
existingItem.updatedAt = newItemDate;
if (existingItem.watched < newItem.watched) {
existingItem.updatedAt = defaultAndCoerceDateTime(
newItem.updatedAt,
);
existingItem.watched = newItem.watched;
}
itemsUpserted.push(existingItem);