Skip to content

Commit

Permalink
feat(ui): expose manual toggle red dot function
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonwellsjo committed Oct 16, 2023
1 parent dd856d4 commit cf6ca0d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/admin/adminService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ export class AdminService {
private async keydownListener(e: KeyboardEvent): Promise<void> {
// console.log(e)
if (!this.cfg.predicate(e)) return
await this.checkToggleRedDot()
}

async checkToggleRedDot(): Promise<void> {
try {
const allow = await this.cfg[this.adminMode ? 'beforeExit' : 'beforeEnter']()
if (!allow) return // no change
Expand Down

0 comments on commit cf6ca0d

Please sign in to comment.