mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-23 00:49:32 +00:00
Always show autotype notifications. Fixes #814
This commit is contained in:
@@ -8,6 +8,9 @@
|
||||
|
||||
#import "MPUserNotificationCenterDelegate.h"
|
||||
|
||||
NSString *const kMPUserNotificationInfoKeyNotificationType = @"kMPUserNotificationInfoKeyNotificationType";
|
||||
NSString *const kMPUserNotificationTypeAutotype = @"kMPUserNotificationTypeAutotype";
|
||||
|
||||
@implementation MPUserNotificationCenterDelegate
|
||||
|
||||
- (instancetype)init {
|
||||
@@ -22,4 +25,14 @@
|
||||
NSLog(@"%@", notification);
|
||||
}
|
||||
|
||||
- (BOOL)userNotificationCenter:(NSUserNotificationCenter *)center shouldPresentNotification:(NSUserNotification *)notification {
|
||||
NSDictionary *userInfo = notification.userInfo;
|
||||
if(!userInfo) {
|
||||
return NO;
|
||||
}
|
||||
NSString *value = userInfo[kMPUserNotificationInfoKeyNotificationType];
|
||||
return [value isEqualToString:kMPUserNotificationTypeAutotype];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user