Implement push subscription expiry
This commit is contained in:
		
							parent
							
								
									47ad024ec7
								
							
						
					
					
						commit
						0f0074cbab
					
				
					 16 changed files with 272 additions and 102 deletions
				
			
		|  | @ -57,7 +57,6 @@ import { IncorrectPasswordError, UnauthorizedError } from "../app/errors"; | |||
| import { ProChip } from "./SubscriptionPopup"; | ||||
| import theme from "./theme"; | ||||
| import session from "../app/Session"; | ||||
| import subscriptionManager from "../app/SubscriptionManager"; | ||||
| 
 | ||||
| const Account = () => { | ||||
|   if (!session.exists()) { | ||||
|  |  | |||
|  | @ -58,9 +58,7 @@ const App = () => { | |||
| const updateTitle = (newNotificationsCount) => { | ||||
|   document.title = newNotificationsCount > 0 ? `(${newNotificationsCount}) ntfy` : "ntfy"; | ||||
| 
 | ||||
|   if ("setAppBadge" in window.navigator) { | ||||
|     window.navigator.setAppBadge(newNotificationsCount); | ||||
|   } | ||||
|   window.navigator.setAppBadge?.(newNotificationsCount); | ||||
| }; | ||||
| 
 | ||||
| const Layout = () => { | ||||
|  |  | |||
|  | @ -10,7 +10,6 @@ import session from "../app/Session"; | |||
| import accountApi from "../app/AccountApi"; | ||||
| import { UnauthorizedError } from "../app/errors"; | ||||
| import { webPushRefreshWorker, useWebPushUpdateWorker } from "../app/WebPushWorker"; | ||||
| import notifier from "../app/Notifier"; | ||||
| 
 | ||||
| /** | ||||
|  * Wire connectionManager and subscriptionManager so that subscriptions are updated when the connection | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue