aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src
diff options
context:
space:
mode:
Diffstat (limited to 'client/src')
-rw-r--r--client/src/app/shared/video/abstract-video-list.ts20
1 files changed, 15 insertions, 5 deletions
diff --git a/client/src/app/shared/video/abstract-video-list.ts b/client/src/app/shared/video/abstract-video-list.ts
index eba05c07d..8cf21e9d4 100644
--- a/client/src/app/shared/video/abstract-video-list.ts
+++ b/client/src/app/shared/video/abstract-video-list.ts
@@ -167,31 +167,41 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy, DisableFor
167 for (const video of this.videos) { 167 for (const video of this.videos) {
168 const publishedDate = video.publishedAt 168 const publishedDate = video.publishedAt
169 169
170 if (currentGroupedDate < GroupDate.TODAY && isToday(publishedDate)) { 170 if (currentGroupedDate <= GroupDate.TODAY && isToday(publishedDate)) {
171 if (currentGroupedDate === GroupDate.TODAY) continue
172
171 currentGroupedDate = GroupDate.TODAY 173 currentGroupedDate = GroupDate.TODAY
172 this.groupedDates[ video.id ] = currentGroupedDate 174 this.groupedDates[ video.id ] = currentGroupedDate
173 continue 175 continue
174 } 176 }
175 177
176 if (currentGroupedDate < GroupDate.YESTERDAY && isYesterday(publishedDate)) { 178 if (currentGroupedDate <= GroupDate.YESTERDAY && isYesterday(publishedDate)) {
179 if (currentGroupedDate === GroupDate.YESTERDAY) continue
180
177 currentGroupedDate = GroupDate.YESTERDAY 181 currentGroupedDate = GroupDate.YESTERDAY
178 this.groupedDates[ video.id ] = currentGroupedDate 182 this.groupedDates[ video.id ] = currentGroupedDate
179 continue 183 continue
180 } 184 }
181 185
182 if (currentGroupedDate < GroupDate.THIS_WEEK && isThisWeek(publishedDate)) { 186 if (currentGroupedDate <= GroupDate.THIS_WEEK && isThisWeek(publishedDate)) {
187 if (currentGroupedDate === GroupDate.THIS_WEEK) continue
188
183 currentGroupedDate = GroupDate.THIS_WEEK 189 currentGroupedDate = GroupDate.THIS_WEEK
184 this.groupedDates[ video.id ] = currentGroupedDate 190 this.groupedDates[ video.id ] = currentGroupedDate
185 continue 191 continue
186 } 192 }
187 193
188 if (currentGroupedDate < GroupDate.THIS_MONTH && isThisMonth(publishedDate)) { 194 if (currentGroupedDate <= GroupDate.THIS_MONTH && isThisMonth(publishedDate)) {
195 if (currentGroupedDate === GroupDate.THIS_MONTH) continue
196
189 currentGroupedDate = GroupDate.THIS_MONTH 197 currentGroupedDate = GroupDate.THIS_MONTH
190 this.groupedDates[ video.id ] = currentGroupedDate 198 this.groupedDates[ video.id ] = currentGroupedDate
191 continue 199 continue
192 } 200 }
193 201
194 if (currentGroupedDate < GroupDate.OLDER) { 202 if (currentGroupedDate <= GroupDate.OLDER) {
203 if (currentGroupedDate === GroupDate.OLDER) continue
204
195 currentGroupedDate = GroupDate.OLDER 205 currentGroupedDate = GroupDate.OLDER
196 this.groupedDates[ video.id ] = currentGroupedDate 206 this.groupedDates[ video.id ] = currentGroupedDate
197 } 207 }