Skip to content

Commit

Permalink
1. Fixed issue #12.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nightonke committed Mar 17, 2017
1 parent 56fe580 commit f54c7ed
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
4 changes: 2 additions & 2 deletions VHGithubNotifier/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.2</string>
<string>1.0.2.1</string>
<key>CFBundleVersion</key>
<string>1020</string>
<string>1021</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>LSUIElement</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,20 @@ - (void)addNotifications:(NSArray<VHNotification *> *)notifications
userNotification.title = notification.repository.fullName;
userNotification.subtitle = notification.title;
userNotification.informativeText = [notification toNowTimeString];
userNotification.userInfo = @{@"type":@(VHGithubUserNotificationTypeNotification),
@"url":notification.htmlUrl,
@"notificationId":@(notification.notificationId),
@"latestUpdateTime":notification.updateDate};
NSMutableDictionary *userInfo = [NSMutableDictionary dictionaryWithCapacity:4];
[userInfo setObject:@(VHGithubUserNotificationTypeNotification) forKey:@"type"];
if (notification.htmlUrl)
{
[userInfo setObject:notification.htmlUrl forKey:@"url"];
}
if (notification.notificationId)
{
[userInfo setObject:@(notification.notificationId) forKey:@"notificationId"];
}
if (notification.updateDate)
{
[userInfo setObject:notification.updateDate forKey:@"latestUpdateTime"];
}
userNotification.hasActionButton = NO;
userNotification.feature.bannerImage = [VHUtils imageFromNotificationType:notification.type];
[[self userNotifications] push:userNotification];
Expand Down

0 comments on commit f54c7ed

Please sign in to comment.