-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Fix duration of voice message in timeline #30973
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
Conversation
This reverts commit 68bcfbe.
9478ddd
to
bb027d9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but needs an actual @element-hq/element-web-reviewers to check this.
// incomplete or stopped, thus giving an accurate position within the active | ||
// clip segment. | ||
return (this.context.currentTime - this.clipStart) % this.clipDuration; | ||
return (this.context.currentTime - this.clipStart) % this.clipDuration || 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Result of a modulo operation must always be an integer I think, so the only value where it could be falsy is 0 anyway?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a NaN
at some point, one of the values wasn't an integer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah right, of course
Fixes #30958
Revert part of #30961 to fix the root problem