Commit 3d901086 authored by Aral Balkan's avatar Aral Balkan

Removed the Cocoa-side new message display functionality as the timeline...

Removed the Cocoa-side new message display functionality as the timeline itself handles updates via JS. Closes #174.
parent 0fc17cc6
......@@ -10,10 +10,8 @@ import Cocoa
public enum MessageNotification:String
{
case SendMessage = "SendMessageNotification"
case ShowMessage = "ShowMessageNotification"
//
// Static convenience function so consuming code can have clearer intent
static func named(notification:MessageNotification) -> String
{
......
......@@ -170,16 +170,6 @@ class MessageSplitViewController: NSSplitViewController
let message = Message(id: messageFileName, assetURLPrefix: assetURLPrefix, folderURL: fileURL, html: indexHTML as String, personHandle: "", synced: false)
message.timelineID = CurrentTimeline.id
//
// Inform Node that it should post the message to the timeline
// (TODO: Research: should we base this on the Pulse event flow instead? Which is cleaner?)
//
// Note: In the arguments, below:
// * message file name is the message ID
// * message body is the indexHTML
// *
//
// HACK: Pretend to be public timeline if we are on everyone
let timelineIDToSend = CurrentTimeline.id! == "everyone" ? "public" : CurrentTimeline.id!
......@@ -187,28 +177,9 @@ class MessageSplitViewController: NSSplitViewController
{
/* and handle callback with */ result in
// println("<<<<< POST MESSAGE CALLBACK!!!! >>>>>")
println(result)
}
//
// Notify that we need to have the message displayed in the respective timeline
//
let dontShowLocally = userInfo["dontShowLocally"] as? Bool
if dontShowLocally != nil && dontShowLocally!
{
println("Asked not to show the message locally.")
}
else
{
println("Showing the message locally.")
post(MessageNotification.named(.ShowMessage), from: self, with: ["message": message])
}
break
}
}
......
This diff is collapsed.
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