diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 07:33:21 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 07:33:21 +0000 |
commit | 36a59d088eca61b834191dacea009677a96c052f (patch) | |
tree | e4f33972dab5d8ef79e3944a9f403035fceea43f /app/assets/javascripts/frequent_items/utils.js | |
parent | a1761f15ec2cae7c7f7bbda39a75494add0dfd6f (diff) | |
download | gitlab-ce-36a59d088eca61b834191dacea009677a96c052f.tar.gz |
Add latest changes from gitlab-org/gitlab@15-0-stable-eev15.0.0-rc42
Diffstat (limited to 'app/assets/javascripts/frequent_items/utils.js')
-rw-r--r-- | app/assets/javascripts/frequent_items/utils.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/assets/javascripts/frequent_items/utils.js b/app/assets/javascripts/frequent_items/utils.js index 27ef47df8c8..1c33c8b1084 100644 --- a/app/assets/javascripts/frequent_items/utils.js +++ b/app/assets/javascripts/frequent_items/utils.js @@ -1,7 +1,7 @@ import { GlBreakpointInstance as bp } from '@gitlab/ui/dist/utils'; import { take } from 'lodash'; import { sanitize } from '~/lib/dompurify'; -import { FREQUENT_ITEMS, HOUR_IN_MS } from './constants'; +import { FREQUENT_ITEMS, FIFTEEN_MINUTES_IN_MS } from './constants'; export const isMobile = () => ['md', 'sm', 'xs'].includes(bp.getBreakpointSize()); @@ -38,7 +38,8 @@ export const updateExistingFrequentItem = (frequentItem, item) => { // `frequentItem` comes from localStorage and it's possible it doesn't have a `lastAccessedOn` const neverAccessed = !frequentItem.lastAccessedOn; const shouldUpdate = - neverAccessed || Math.abs(item.lastAccessedOn - frequentItem.lastAccessedOn) / HOUR_IN_MS > 1; + neverAccessed || + Math.abs(item.lastAccessedOn - frequentItem.lastAccessedOn) / FIFTEEN_MINUTES_IN_MS > 1; return { ...item, |