Skip to content

Commit

Permalink
Add play bell preference logic to ui
Browse files Browse the repository at this point in the history
  • Loading branch information
nav-28 committed Dec 29, 2022
1 parent 9537294 commit 9ca4721
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ui/notify/src/ctrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ export default function makeCtrl(opts: NotifyOpts, redraw: Redraw): Ctrl {

function attention() {
const id = data?.pager.currentPageResults.find(n => !n.read)?.content.user?.id;
if (!lichess.quietMode || id == 'lichess') lichess.sound.playOnce('newPM');
const playBell = document.body.getAttribute('data-play-bell') === 'true'
if ((!lichess.quietMode || id == 'lichess' ) && playBell) lichess.sound.playOnce('newPM');
opts.pulse();
}

Expand Down

0 comments on commit 9ca4721

Please sign in to comment.