mirror of https://github.com/oxen-io/session-ios
				
				
				
			
			You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			19 lines
		
	
	
		
			899 B
		
	
	
	
		
			Swift
		
	
			
		
		
	
	
			19 lines
		
	
	
		
			899 B
		
	
	
	
		
			Swift
		
	
| // Copyright © 2022 Rangeproof Pty Ltd. All rights reserved.
 | |
| 
 | |
| import Foundation
 | |
| import GRDB
 | |
| 
 | |
| public protocol NotificationsProtocol {
 | |
|     func notifyUser(_ db: Database, for interaction: Interaction, in thread: SessionThread, applicationState: UIApplication.State)
 | |
|     func notifyUser(_ db: Database, forIncomingCall interaction: Interaction, in thread: SessionThread, applicationState: UIApplication.State)
 | |
|     func notifyUser(_ db: Database, forReaction reaction: Reaction, in thread: SessionThread, applicationState: UIApplication.State)
 | |
|     func cancelNotifications(identifiers: [String])
 | |
|     func clearAllNotifications()
 | |
| }
 | |
| 
 | |
| public enum Notifications {
 | |
|     /// Delay notification of incoming messages when we want to group them (eg. during background polling) to avoid
 | |
|     /// firing too many notifications at the same time
 | |
|     public static let delayForGroupedNotifications: TimeInterval = 5
 | |
| }
 |