Commit f519fe72 authored by Aral Balkan's avatar Aral Balkan

Cleaned up some log statements.

parent 32669001
......@@ -128,30 +128,19 @@ public class NativeNotification: NSObject, NSUserNotificationCenterDelegate
// Don’t display the notification if the app is active and the timeline that the message
// came in for is the timeline that is currently active.
//
println("Current timeline ID: \(CurrentTimeline.id)")
let applicationIsActive:Bool = NSApplication.sharedApplication().active
let isConversationTimelineNotification = (notificationType == PulseNotification.named(PulseNotification.ConversationTimelineUpdated))
let isAllFriendsTimelineNotification = (notificationType == PulseNotification.named(PulseNotification.AllFriendsTimelineUpdated))
println("applicationIsActive: \(applicationIsActive)")
println("isConversationTimelineNotification: \(isConversationTimelineNotification)")
println("isAllFriendsTimelineNotification: \(isAllFriendsTimelineNotification)")
let appIsActiveAndTheMessageIsForTheCurrentlyActiveConversationTimeline = (applicationIsActive && isConversationTimelineNotification && fromPerson == CurrentTimeline.id)
let appIsActiveAndTheMessageIsForTheCurrentlyActiveAllFriendsTimeline = (applicationIsActive && isAllFriendsTimelineNotification && CurrentTimeline.id == "allfriends")
println("appIsActiveAndTheMessageIsForTheCurrentlyActiveConversationTimeline: \(appIsActiveAndTheMessageIsForTheCurrentlyActiveConversationTimeline)")
println("appIsActiveAndTheMessageIsForTheCurrentlyActiveAllFriendsTimeline: \(appIsActiveAndTheMessageIsForTheCurrentlyActiveAllFriendsTimeline)")
let shouldNotDisplayNativeNotification = (appIsActiveAndTheMessageIsForTheCurrentlyActiveConversationTimeline || appIsActiveAndTheMessageIsForTheCurrentlyActiveAllFriendsTimeline)
println("shouldNotDisplayNativeNotification: \(shouldNotDisplayNativeNotification)")
if shouldNotDisplayNativeNotification
{
println("App is active and the message is for the currently active timeline: not showing native notification.")
// println("App is active and the message is for the currently active timeline: not showing native notification.")
return
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment