1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Change date to days

Co-authored-by: Bill Thornton <thornbill@users.noreply.github.com>
This commit is contained in:
1337Nerd 2023-10-11 17:25:08 -05:00 committed by GitHub
parent 21b0da8e9c
commit 9d9670bdd0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -65,7 +65,7 @@ function reloadData(instance, elem, apiClient, startIndex, limit) {
limit ||= parseInt(elem.getAttribute('data-activitylimit') || '7', 10);
const minDate = new Date();
const hasUserId = toBoolean(elem.getAttribute('data-useractivity'), true);
const dateOffset = hasUserId ? 1 : 7; // one day back if user id, otherwise one week
const daysOffset = hasUserId ? 1 : 7; // one day back if user id, otherwise one week
// TODO: Use date-fns
minDate.setTime(minDate.getTime() - dateOffset * 24 * 60 * 60 * 1000);