fixed #22 and version bump
This commit is contained in:
parent
35a4d4a16f
commit
697b147796
2 changed files with 2 additions and 44 deletions
|
@ -10,11 +10,6 @@
|
||||||
#import "NewMessageWindow.h"
|
#import "NewMessageWindow.h"
|
||||||
#import "TweetModel.h"
|
#import "TweetModel.h"
|
||||||
|
|
||||||
@interface NSUserNotificationCenter (Private)
|
|
||||||
- (void)_removeAllDisplayedNotifications;
|
|
||||||
- (void)_removeDisplayedNotification:(NSUserNotification *)notification;
|
|
||||||
@end
|
|
||||||
|
|
||||||
@implementation Controller
|
@implementation Controller
|
||||||
@synthesize loginViewWindow;
|
@synthesize loginViewWindow;
|
||||||
@synthesize loginEntityTextField;
|
@synthesize loginEntityTextField;
|
||||||
|
@ -269,33 +264,11 @@
|
||||||
[timelineViewWindow setTitle:[NSString stringWithFormat:@"Tentia"]];
|
[timelineViewWindow setTitle:[NSString stringWithFormat:@"Tentia"]];
|
||||||
[[[NSApplication sharedApplication] dockTile] setBadgeLabel:nil];
|
[[[NSApplication sharedApplication] dockTile] setBadgeLabel:nil];
|
||||||
[mentionsView stringByEvaluatingJavaScriptFromString:@"tentia_instance.unread_mentions = 0;"];
|
[mentionsView stringByEvaluatingJavaScriptFromString:@"tentia_instance.unread_mentions = 0;"];
|
||||||
|
|
||||||
if ([NSUserNotificationCenter class]) {
|
|
||||||
[[NSUserNotificationCenter defaultUserNotificationCenter] _removeAllDisplayedNotifications]; // Undocumented API
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)notificateUserAboutMention:(NSString *)text fromName:(NSString *)name withPostId:(NSString *)postId andEntity:(NSString *)entity
|
- (void)notificateUserAboutMention:(NSString *)text fromName:(NSString *)name withPostId:(NSString *)postId andEntity:(NSString *)entity
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
if ([NSUserNotificationCenter class]) {
|
|
||||||
|
|
||||||
NSUserNotification *notification = [[NSUserNotification alloc] init];
|
|
||||||
notification.title = @"Tent Mention";
|
|
||||||
notification.subtitle = [NSString stringWithFormat:@"by %@", name];
|
|
||||||
notification.informativeText = text;
|
|
||||||
notification.hasActionButton = YES;
|
|
||||||
notification.actionButtonTitle = @"Show";
|
|
||||||
notification.soundName = NSUserNotificationDefaultSoundName;
|
|
||||||
notification.userInfo = [NSDictionary dictionaryWithObjectsAndKeys:
|
|
||||||
entity, @"entity",
|
|
||||||
postId, @"postId", nil];
|
|
||||||
|
|
||||||
[[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification:notification];
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
[GrowlApplicationBridge
|
[GrowlApplicationBridge
|
||||||
notifyWithTitle:[NSString stringWithFormat:@"Mentioned by %@ on Tent", name]
|
notifyWithTitle:[NSString stringWithFormat:@"Mentioned by %@ on Tent", name]
|
||||||
description:text
|
description:text
|
||||||
|
@ -377,17 +350,6 @@
|
||||||
[conversationViewWindow makeKeyAndOrderFront:self];
|
[conversationViewWindow makeKeyAndOrderFront:self];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notifications
|
|
||||||
/*
|
|
||||||
- (void)userNotificationCenter:(NSUserNotificationCenter *)center didActivateNotification:(NSUserNotification *)notification
|
|
||||||
{
|
|
||||||
[self showConversationForPostId:[notification.userInfo objectForKey:@"postId"] andEntity:[notification.userInfo objectForKey:@"entity"]];
|
|
||||||
|
|
||||||
[[NSUserNotificationCenter defaultUserNotificationCenter] _removeDisplayedNotification:notification]; // Undocumented API
|
|
||||||
//[[self mentionsViewWindow] makeKeyAndOrderFront:self];
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
- (void)growlNotificationWasClicked:(id)clickContext
|
- (void)growlNotificationWasClicked:(id)clickContext
|
||||||
{
|
{
|
||||||
NSDictionary *userInfo = (NSDictionary *)clickContext;
|
NSDictionary *userInfo = (NSDictionary *)clickContext;
|
||||||
|
@ -398,10 +360,6 @@
|
||||||
|
|
||||||
NSString *js = [NSString stringWithFormat:@"tentia_instance.mentionRead('%@', '%@');", postId, entity];
|
NSString *js = [NSString stringWithFormat:@"tentia_instance.mentionRead('%@', '%@');", postId, entity];
|
||||||
[mentionsView stringByEvaluatingJavaScriptFromString:js];
|
[mentionsView stringByEvaluatingJavaScriptFromString:js];
|
||||||
|
|
||||||
if ([NSUserNotificationCenter class]) {
|
|
||||||
// [[NSUserNotificationCenter defaultUserNotificationCenter] _removeDisplayedNotification:[userInfo objectForKey:@"notification"]]; // Undocumented API
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
- (NSDictionary *)registrationDictionaryForGrowl
|
- (NSDictionary *)registrationDictionaryForGrowl
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>0.2.0</string>
|
<string>0.2.1</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleURLTypes</key>
|
<key>CFBundleURLTypes</key>
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>0.2.0</string>
|
<string>0.2.1</string>
|
||||||
<key>LSApplicationCategoryType</key>
|
<key>LSApplicationCategoryType</key>
|
||||||
<string>public.app-category.lifestyle</string>
|
<string>public.app-category.lifestyle</string>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
|
|
Reference in a new issue