Add iOS notification scheduler
This commit is contained in:
@@ -161,6 +161,17 @@ struct TeleTuiIOSSmokeTests {
|
||||
precondition(policy.shouldNotify(chat: chat, message: incomingMention, mentionOnly: true))
|
||||
precondition(!policy.shouldNotify(chat: chat, message: incomingPlain, mentionOnly: true))
|
||||
precondition(!policy.shouldNotify(chat: muted, message: incomingMention, mentionOnly: false))
|
||||
let scheduler = RecordingNotificationScheduler()
|
||||
let mentionCoordinator = NotificationCoordinator(scheduler: scheduler, mentionOnly: true)
|
||||
try await mentionCoordinator.handle(chat: chat, message: incomingPlain)
|
||||
var scheduledCount = await scheduler.scheduledCount()
|
||||
precondition(scheduledCount == 0)
|
||||
try await mentionCoordinator.handle(chat: chat, message: incomingMention)
|
||||
scheduledCount = await scheduler.scheduledCount()
|
||||
precondition(scheduledCount == 1)
|
||||
try await mentionCoordinator.handle(chat: muted, message: incomingMention)
|
||||
scheduledCount = await scheduler.scheduledCount()
|
||||
precondition(scheduledCount == 1)
|
||||
|
||||
let clipboard = InMemoryClipboardWriter()
|
||||
await clipboard.write(text: "copied")
|
||||
|
||||
Reference in New Issue
Block a user