Skip to content

Commit

Permalink
Merge pull request #4392 from traPtitech/fix/update_toast_show_often
Browse files Browse the repository at this point in the history
アップデートtoastが出る条件を厳しく
  • Loading branch information
nokhnaton authored Oct 28, 2024
2 parents cffdf9d + d238b01 commit f5a0f67
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/lib/notification/updateToast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,6 @@ export const setupUpdateToast = (
return
}

// swが更新できるときにトースト表示
const newWorker = registration.installing
if (newWorker) {
newWorker.addEventListener('statechange', () => {
if (newWorker.state !== 'installed') return
doCanUpdate()
})
return
}

// swが更新できるときにトースト表示
registration.addEventListener('updatefound', () => {
const newWorker = registration.installing
Expand Down

0 comments on commit f5a0f67

Please sign in to comment.