Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The page needs to reload when the day changes #22

Closed
aschmitigal22 opened this issue Mar 14, 2022 · 1 comment · Fixed by #23
Closed

The page needs to reload when the day changes #22

aschmitigal22 opened this issue Mar 14, 2022 · 1 comment · Fixed by #23
Assignees

Comments

@aschmitigal22
Copy link
Collaborator

aschmitigal22 commented Mar 14, 2022

Currently, the page doesn't reload when the page changes and this is not good because the day JSON only has the periods for the current day, and in order for it to get the periods for the next day, it needs to reload.

In the update function at line: 94 in vuescript.js

update() {
    if (!this.currentPeriod.isCurrent()) {
      if (this.currentPeriod.start.day() != dayjs().day()) {                         <<<
         location.reload();                                                          <<<
      }                                                                              <<<
      this.updatePage = false;
      periodListComponent.listPeriod.forEach((p) => {
        if(p.isCurrent()) {
          this.currentPeriod = p;
        }});

      setTimeout(() => { this.updatePage = true; }, 10);
    }
}
@aschmitigal22
Copy link
Collaborator Author

I am too lazy to open a dev environment and fix it

@aschmitigal22 aschmitigal22 linked a pull request Mar 21, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants