aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/video
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/video')
-rw-r--r--client/src/app/shared/video/abstract-video-list.ts22
1 files changed, 11 insertions, 11 deletions
diff --git a/client/src/app/shared/video/abstract-video-list.ts b/client/src/app/shared/video/abstract-video-list.ts
index 8cf21e9d4..dc8f9cda9 100644
--- a/client/src/app/shared/video/abstract-video-list.ts
+++ b/client/src/app/shared/video/abstract-video-list.ts
@@ -12,14 +12,14 @@ import { Syndication } from '@app/shared/video/syndication.model'
12import { Notifier, ServerService } from '@app/core' 12import { Notifier, ServerService } from '@app/core'
13import { DisableForReuseHook } from '@app/core/routing/disable-for-reuse-hook' 13import { DisableForReuseHook } from '@app/core/routing/disable-for-reuse-hook'
14import { I18n } from '@ngx-translate/i18n-polyfill' 14import { I18n } from '@ngx-translate/i18n-polyfill'
15import { isThisMonth, isThisWeek, isToday, isYesterday } from '@shared/core-utils/miscs/date' 15import { isLastMonth, isLastWeek, isToday, isYesterday } from '@shared/core-utils/miscs/date'
16 16
17enum GroupDate { 17enum GroupDate {
18 UNKNOWN = 0, 18 UNKNOWN = 0,
19 TODAY = 1, 19 TODAY = 1,
20 YESTERDAY = 2, 20 YESTERDAY = 2,
21 THIS_WEEK = 3, 21 LAST_WEEK = 3,
22 THIS_MONTH = 4, 22 LAST_MONTH = 4,
23 OLDER = 5 23 OLDER = 5
24} 24}
25 25
@@ -84,8 +84,8 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy, DisableFor
84 [GroupDate.UNKNOWN]: null, 84 [GroupDate.UNKNOWN]: null,
85 [GroupDate.TODAY]: this.i18n('Today'), 85 [GroupDate.TODAY]: this.i18n('Today'),
86 [GroupDate.YESTERDAY]: this.i18n('Yesterday'), 86 [GroupDate.YESTERDAY]: this.i18n('Yesterday'),
87 [GroupDate.THIS_WEEK]: this.i18n('This week'), 87 [GroupDate.LAST_WEEK]: this.i18n('Last week'),
88 [GroupDate.THIS_MONTH]: this.i18n('This month'), 88 [GroupDate.LAST_MONTH]: this.i18n('Last month'),
89 [GroupDate.OLDER]: this.i18n('Older') 89 [GroupDate.OLDER]: this.i18n('Older')
90 } 90 }
91 91
@@ -183,18 +183,18 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy, DisableFor
183 continue 183 continue
184 } 184 }
185 185
186 if (currentGroupedDate <= GroupDate.THIS_WEEK && isThisWeek(publishedDate)) { 186 if (currentGroupedDate <= GroupDate.LAST_WEEK && isLastWeek(publishedDate)) {
187 if (currentGroupedDate === GroupDate.THIS_WEEK) continue 187 if (currentGroupedDate === GroupDate.LAST_WEEK) continue
188 188
189 currentGroupedDate = GroupDate.THIS_WEEK 189 currentGroupedDate = GroupDate.LAST_WEEK
190 this.groupedDates[ video.id ] = currentGroupedDate 190 this.groupedDates[ video.id ] = currentGroupedDate
191 continue 191 continue
192 } 192 }
193 193
194 if (currentGroupedDate <= GroupDate.THIS_MONTH && isThisMonth(publishedDate)) { 194 if (currentGroupedDate <= GroupDate.LAST_MONTH && isLastMonth(publishedDate)) {
195 if (currentGroupedDate === GroupDate.THIS_MONTH) continue 195 if (currentGroupedDate === GroupDate.LAST_MONTH) continue
196 196
197 currentGroupedDate = GroupDate.THIS_MONTH 197 currentGroupedDate = GroupDate.LAST_MONTH
198 this.groupedDates[ video.id ] = currentGroupedDate 198 this.groupedDates[ video.id ] = currentGroupedDate
199 continue 199 continue
200 } 200 }