Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions TelegramTest/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -245,13 +245,15 @@ - (void)userNotificationCenter:(NSUserNotificationCenter *)center didActivateNot
ELog(@"nil dialog here, check it");
return;
}

[self.mainWindow deminiaturize:self];


[self.mainWindow.navigationController showMessagesViewController:dialog];


if (floor(NSAppKitVersionNumber) > 1187 && notification.activationType == 3) { //NSUserNotificationActivationTypeReplied)
if (notification.activationType != 3) {
// only deminiaturize the window if user clicked the notification itself
// and not replied
[self.mainWindow deminiaturize:self];
} else if (floor(NSAppKitVersionNumber) > 1187 && notification.activationType == 3) { //NSUserNotificationActivationTypeReplied)
NSString *userResponse = notification.response.string;

dispatch_async(dispatch_get_main_queue(), ^{
Expand All @@ -273,9 +275,6 @@ - (void)userNotificationCenter:(NSUserNotificationCenter *)center didActivateNot
return;
}




}

-(void)didStatusItemClicked {
Expand Down