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

Update author date again #1286

Merged
merged 2 commits into from
Mar 3, 2020
Merged

Conversation

campersau
Copy link
Collaborator

This code for updating the author date after some time wasn't called any more

updateLastAuthorDateFromNow(deltaT) {
this.lastUpdatedAuthorDateFromNow = this.lastUpdatedAuthorDateFromNow || 0;
this.lastUpdatedAuthorDateFromNow += deltaT;
if(this.lastUpdatedAuthorDateFromNow > 60 * 1000) {
this.lastUpdatedAuthorDateFromNow = 0;
this.authorDateFromNow(this.authorDate().fromNow());
}
}
updateAnimationFrame(deltaT) {
this.updateLastAuthorDateFromNow(deltaT);
}

Because updateAnimationFrame was removed from git-node and graph in #630 which wasn't noted because of this check

if (this.graph.updateAnimationFrame) this.graph.updateAnimationFrame(deltaT);

Since updating the author date is the only thing that is done inside of window.requestAnimationFrame we could also consider changing it to a setTimeout.

@campersau campersau merged commit b61e37a into FredrikNoren:master Mar 3, 2020
@campersau campersau deleted the updateauthordate branch March 3, 2020 08:46
@campersau campersau mentioned this pull request Mar 3, 2020
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 this pull request may close these issues.

1 participant