File tree 3 files changed +4
-4
lines changed
3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -25,9 +25,9 @@ async function scheduleNextAlarm(interval) {
25
25
}
26
26
27
27
async function handleLastModified ( newLastModified ) {
28
- const lastModified = await localStore . get ( 'lastModified' ) || new Date ( 0 ) ;
28
+ const lastModified = await localStore . get ( 'lastModified' ) || new Date ( 0 ) . toUTCString ( ) ;
29
29
30
- // Something has changed since we last accessed, display any new notificaitons
30
+ // Something has changed since we last accessed, display any new notifications
31
31
if ( newLastModified !== lastModified ) {
32
32
const { showDesktopNotif, playNotifSound} = await optionsStorage . getAll ( ) ;
33
33
if ( showDesktopNotif === true || playNotifSound === true ) {
Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ export async function getNotificationCount() {
126
126
const { headers, json : notifications } = await getNotificationResponse ( { maxItems : 1 } ) ;
127
127
128
128
const interval = Number ( headers . get ( 'X-Poll-Interval' ) ) ;
129
- const lastModified = ( new Date ( headers . get ( 'Last-Modified' ) ) ) . toGMTString ( ) ;
129
+ const lastModified = ( new Date ( headers . get ( 'Last-Modified' ) ) ) . toUTCString ( ) ;
130
130
const linkHeader = headers . get ( 'Link' ) ;
131
131
132
132
if ( linkHeader === null ) {
Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ export function playNotificationSound() {
125
125
}
126
126
127
127
export async function checkNotifications ( lastModified ) {
128
- let notifications = await getNotifications ( { lastModified : lastModified . toGMTString ( ) } ) ;
128
+ let notifications = await getNotifications ( { lastModified} ) ;
129
129
const { showDesktopNotif, playNotifSound, filterNotifications} = await optionsStorage . getAll ( ) ;
130
130
131
131
if ( filterNotifications ) {
You can’t perform that action at this time.
0 commit comments