mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-21 16:55:25 +03:00
Try focus first, then postMessage
This commit is contained in:
parent
e9075906f8
commit
c9545cdc34
1 changed files with 1 additions and 1 deletions
|
@ -179,12 +179,12 @@ self.addEventListener('notificationclick', (event) => {
|
|||
console.log('NOTIFICATION CLICK navigate', url);
|
||||
if (bestClient) {
|
||||
console.log('NOTIFICATION CLICK postMessage', bestClient);
|
||||
bestClient.focus();
|
||||
bestClient.postMessage?.({
|
||||
type: 'notification',
|
||||
id: tag,
|
||||
accessToken: access_token,
|
||||
});
|
||||
bestClient.focus();
|
||||
} else {
|
||||
console.log('NOTIFICATION CLICK openWindow', url);
|
||||
await self.clients.openWindow(url);
|
||||
|
|
Loading…
Reference in a new issue