Skip to content

Commit

Permalink
fix bar flicker on android brave
Browse files Browse the repository at this point in the history
can probably delete in a few months
  • Loading branch information
schlawg authored Feb 12, 2025
1 parent 04b9ab3 commit 5e78305
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ui/round/src/clock/clockView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ function showBar(ctrl: RoundController, color: Color) {

export function updateElements(clock: ClockController, els: ClockElements, millis: Millis): void {
if (els.time) els.time.innerHTML = formatClockTime(millis, clock.showTenths(millis), true, clock.opts.nvui);
if (els.bar) els.bar.style.transform = 'scale(' + clock.timeRatio(millis) + ',1)';
// 12/02/2025 Brave 1.74.51 android flickers the bar oninline transforms, even though .bar is display: none
if (els.bar && getComputedStyle(els.bar).display === 'block')

Check failure on line 117 in ui/round/src/clock/clockView.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected use of 'getComputedStyle'

Check failure on line 117 in ui/round/src/clock/clockView.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected use of 'getComputedStyle'
els.bar.style.transform = 'scale(' + clock.timeRatio(millis) + ',1)';
if (els.clock) {
const cl = els.clock.classList;
if (millis < clock.emergMs) cl.add('emerg');
Expand Down

0 comments on commit 5e78305

Please sign in to comment.