From b91f0c14bf5357fbd3b2f3e6a1a4f63995fe27d3 Mon Sep 17 00:00:00 2001 From: Michael Bauer <michael-bauer@posteo.de> Date: Fri, 19 Apr 2024 18:41:18 +0200 Subject: [PATCH] Do not trigger currentDate if last day is visible It does not have to be the currentDate. This holds only for the first day. --- .../alsijil/frontend/components/coursebook/Coursebook.vue | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/aleksis/apps/alsijil/frontend/components/coursebook/Coursebook.vue b/aleksis/apps/alsijil/frontend/components/coursebook/Coursebook.vue index 7fe4d6684..91a6d3376 100644 --- a/aleksis/apps/alsijil/frontend/components/coursebook/Coursebook.vue +++ b/aleksis/apps/alsijil/frontend/components/coursebook/Coursebook.vue @@ -259,9 +259,7 @@ export default { if (entry.isIntersecting) { // TODO: Make 165 a var? - if ((entry.boundingClientRect.top <= 165) - || first - || last) { + if ((entry.boundingClientRect.top <= 165) || first) { console.log('@', date.toISODate()); this.setDate(date.toISODate()); } -- GitLab