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
0078163f
Unverified
Commit
0078163f
authored
Aug 28, 2015
by
Aral Balkan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed old hacks that were showing the entire timeline every time a new message was received.
parent
66ce5d21
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
22 deletions
+24
-22
Heartbeat/TimelineViewController.swift
Heartbeat/TimelineViewController.swift
+24
-22
No files found.
Heartbeat/TimelineViewController.swift
View file @
0078163f
...
...
@@ -148,15 +148,16 @@ class TimelineViewController: NSViewController, WKNavigationDelegate
/* as */
notification
in
println
(
"All friends timeline was updated from Pulse / Node."
)
println
(
"NOT DOING ANYTHING. SEE WHAT THIS BREAKS."
)
// For now, only update the timeline if it is the current one.
// TODO: in the future we could display a badge.
if
CurrentTimeline
.
id
==
"allfriends"
{
println
(
"All friends is the current timeline. Refreshing it."
)
self
.
showTimeline
(
Timelines
.
sharedInstance
[
.
AllFriends
]
!
)
}
//
if CurrentTimeline.id == "allfriends"
//
{
//
println("All friends is the current timeline. Refreshing it.")
//
self.showTimeline(Timelines.sharedInstance[.AllFriends]!)
//
}
}
//
...
...
@@ -169,22 +170,23 @@ class TimelineViewController: NSViewController, WKNavigationDelegate
/* as */
notification
in
println
(
"Conversation timeline updated from Pulse / Node."
)
println
(
notification
)
if
let
userInfo
=
notification
.
userInfo
,
data
:
AnyObject
=
userInfo
[
"data"
],
repo
=
data
[
"repo"
]
as?
String
{
println
(
"Repo:
\(
repo
)
"
)
let
components
=
repo
.
componentsSeparatedByString
(
"-to"
)
if
components
.
count
>
0
{
let
timeline
=
components
[
0
]
// NOTE: This will fail if we get this call when we’re on the wrong timeline.
// TODO FIX !!!
println
(
"ℹ️ About to show conversation timeline:
\(
timeline
)
"
)
self
.
showTimeline
(
self
.
currentTimeline
)
}
}
println
(
"NOT DOING ANYTHING. SEE WHAT THIS BREAKS."
)
// println(notification)
//
// if let userInfo = notification.userInfo, data:AnyObject = userInfo["data"], repo = data["repo"] as? String
// {
// println("Repo: \(repo)")
// let components = repo.componentsSeparatedByString("-to")
//
// if components.count > 0
// {
// let timeline = components[0]
// // NOTE: This will fail if we get this call when we’re on the wrong timeline.
// // TODO FIX !!!
// println("ℹ️ About to show conversation timeline: \(timeline)")
// self.showTimeline(self.currentTimeline)
// }
// }
}
...
...
@@ -197,7 +199,7 @@ class TimelineViewController: NSViewController, WKNavigationDelegate
{
/* as */
notification
in
//
println("Received TimelineNavigationRequestNotification: \(notification)…")
println
(
"Received TimelineNavigationRequestNotification:
\(
notification
)
…"
)
if
let
userInfo
=
notification
.
userInfo
,
timeline
=
userInfo
[
"timeline"
]
as?
Timeline
{
...
...
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