Always show autotype notifications. Fixes #814

This commit is contained in:
Michael Starke
2018-07-12 22:55:22 +02:00
parent 1f7fb693a9
commit 1f2b0447e2
3 changed files with 17 additions and 3 deletions

View File

@@ -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