Page MenuHomePhabricator

[web] Updates to push notif service worker for unused-promise Flow lint
ClosedPublic

Authored by ashoat on Dec 4 2023, 1:12 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 24, 6:45 AM
Unknown Object (File)
Sun, Mar 23, 9:04 PM
Unknown Object (File)
Sun, Mar 23, 9:04 PM
Unknown Object (File)
Sun, Mar 23, 9:03 PM
Unknown Object (File)
Feb 22 2025, 12:38 AM
Unknown Object (File)
Feb 14 2025, 4:14 PM
Unknown Object (File)
Feb 14 2025, 4:14 PM
Unknown Object (File)
Feb 14 2025, 4:13 PM
Subscribers

Details

Summary

Two changes here:

  1. Passing skipWaiting directly in self.addEventListener('install', skipWaiting). It looks like the types work for this.
  2. Modifying the NotificationEvent.waitUntil call to wait until openWindow completes. I think the unused-promise Lint was helpful here in catching a case we should await, but would appreciate close review.

Depends on D10164

Test Plan

Flow

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable