Commit 40e7a217 authored by Aral Balkan's avatar Aral Balkan
Browse files

Fixed the issue with the initial new person message being shown twice in the...

Fixed the issue with the initial new person message being shown twice in the Public timeline after transitioning from setup.
parent 3dd1dca5
......@@ -361,7 +361,7 @@ class MainInterfaceSplitViewController: NSSplitViewController
let messageData = messageString.dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: false)
let messageAttributedString = NSAttributedString(HTML: messageData!, baseURL: NSURL(string: "")!, documentAttributes: nil)!
post(MessageNotification.named(.SendMessage), from: nil, with: ["message": messageAttributedString, "type":MessageType.named(.NewPersonNotification)])
post(MessageNotification.named(.SendMessage), from: nil, with: ["message": messageAttributedString, "type":MessageType.named(.NewPersonNotification), "dontShowLocally":true])
}
}
......
......@@ -200,7 +200,18 @@ class MessageSplitViewController: NSSplitViewController
//
// Notify that we need to have the message displayed in the respective timeline
//
post(MessageNotification.named(.ShowMessage), from: self, with: ["message": message])
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
......
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