Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Heartbeat Cocoa
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
117
Issues
117
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ind.ie Projects
Heartbeat Cocoa
Commits
f519fe72
Unverified
Commit
f519fe72
authored
Aug 29, 2015
by
Aral Balkan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaned up some log statements.
parent
32669001
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
12 deletions
+1
-12
Heartbeat/NativeNotification.swift
Heartbeat/NativeNotification.swift
+1
-12
No files found.
Heartbeat/NativeNotification.swift
View file @
f519fe72
...
...
@@ -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
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment