From 26f4f849059219bbf043f449f5063a447dc84f89 Mon Sep 17 00:00:00 2001 From: Aditya Vaidyam Date: Fri, 1 Jul 2016 16:06:05 -0400 Subject: [PATCH] v0.4-alpha --- Hangouts/ConversationList.swift | 13 +++++++++++++ Parrot/ConversationViewController.swift | 1 - Parrot/ConversationsViewController.swift | 11 ++++++++++- Parrot/Info.plist | 24 ++++++++++++------------ 4 files changed, 35 insertions(+), 14 deletions(-) diff --git a/Hangouts/ConversationList.swift b/Hangouts/ConversationList.swift index ed17dff..9906395 100755 --- a/Hangouts/ConversationList.swift +++ b/Hangouts/ConversationList.swift @@ -2,6 +2,19 @@ import Foundation import class ParrotServiceExtension.Wrapper public protocol ConversationListDelegate { + /* + conversationNotification(note) + eventNotification(note) + focusNotification(note) + typingNotification(note) + notificationLevelNotification(note) + watermarkNotification(note) + viewModification(note) + selfPresenceNotification(note) + deleteNotification(note) + presenceNotification(note) + */ + func conversationList(_ list: ConversationList, didReceiveEvent event: IEvent) func conversationList(_ list: ConversationList, didChangeTypingStatusTo status: TypingType) func conversationList(_ list: ConversationList, didReceiveWatermarkNotification status: IWatermarkNotification) diff --git a/Parrot/ConversationViewController.swift b/Parrot/ConversationViewController.swift index d256fa2..ba5320e 100755 --- a/Parrot/ConversationViewController.swift +++ b/Parrot/ConversationViewController.swift @@ -336,5 +336,4 @@ class ConversationViewController: NSViewController, ConversationDelegate, NSText } sendQ.async(execute: operation) } - } diff --git a/Parrot/ConversationsViewController.swift b/Parrot/ConversationsViewController.swift index 75b607a..b35c6a9 100755 --- a/Parrot/ConversationsViewController.swift +++ b/Parrot/ConversationsViewController.swift @@ -169,7 +169,16 @@ class ConversationsViewController: NSViewController, ConversationListDelegate { return self.conversationList?.conversations.map { _getPerson($0) } } - func conversationList(_ list: ConversationList, didReceiveEvent event: IEvent) {} + func conversationList(_ list: ConversationList, didReceiveEvent event: IEvent) { + guard event is IChatMessageEvent else { return } + + // pls fix :( + DispatchQueue.main.async { + self.personsView.dataSource = self._getAllPersons()!.map { Wrapper.init($0) } + UserNotificationCenter.updateDockBadge(self.conversationList?.unreadEventCount ?? 0) + } + } + func conversationList(_ list: ConversationList, didChangeTypingStatusTo status: TypingType) {} func conversationList(_ list: ConversationList, didReceiveWatermarkNotification status: IWatermarkNotification) {} diff --git a/Parrot/Info.plist b/Parrot/Info.plist index 658826d..c45a24c 100644 --- a/Parrot/Info.plist +++ b/Parrot/Info.plist @@ -4,6 +4,8 @@ CFBundleDevelopmentRegion en + CFBundleDisplayName + $(PRODUCT_NAME) CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIconFile @@ -14,32 +16,30 @@ 6.0 CFBundleName $(PRODUCT_NAME) - CFBundleDisplayName - $(PRODUCT_NAME) CFBundlePackageType APPL + CFBundleShortVersionString + v0.4-alpha CFBundleSignature ???? - CFBundleShortVersionString - v0.3-alpha CFBundleVersion - v0.3-alpha + 247 + GithubRepository + avaidyam/Parrot LSApplicationCategoryType public.app-category.social-networking LSMinimumSystemVersion $(MACOSX_DEPLOYMENT_TARGET) + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + NSHumanReadableCopyright Copyright © 2015 - 2016 Aditya Vaidyam. All rights reserved. NSMainStoryboardFile Main NSPrincipalClass NSApplication - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - - GithubRepository - avaidyam/Parrot