Commit 6061a1c3 authored by Aral Balkan's avatar Aral Balkan

Now hiding the message editor when the no friends message is showing in the...

Now hiding the message editor when the no friends message is showing in the Private Conversations timeline and showing it again on other timelines. Closes #176.
parent 43528347
......@@ -1132,7 +1132,7 @@
</subviews>
<nil key="backgroundColor"/>
</clipView>
<scroller key="horizontalScroller" verticalHuggingPriority="750" horizontal="YES" id="b4B-VU-vU0">
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="b4B-VU-vU0">
<rect key="frame" x="1" y="119" width="223" height="15"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
......
......@@ -13,7 +13,11 @@ import Cocoa
class MessageSplitViewController: NSSplitViewController
{
var sendMessageNotificationHandler:NotificationHandler?
var sendMessageNotificationHandler: NotificationHandler?
var timelineNoticeDisplayRequestHandler: NotificationHandler?
var timelineNavigationRequestHandler: NotificationHandler?
var messageEditorSplitViewItem: NSSplitViewItem?
//
// MARK: - View lifecycle
......@@ -23,6 +27,8 @@ class MessageSplitViewController: NSSplitViewController
{
super.viewDidAppear()
messageEditorSplitViewItem = messageEditorSplitViewItem ?? splitViewItems[1] as? NSSplitViewItem
createConstraints()
addNotificationHandlers()
......@@ -43,6 +49,29 @@ class MessageSplitViewController: NSSplitViewController
{
// println("\(self): adding notification handlers.")
//
// Handle the showing and hiding of the message editor view based on whether a notice is showing.
//
timelineNoticeDisplayRequestHandler = timelineNoticeDisplayRequestHandler ?? handle(TimelineNoticeDisplayRequestNotification)
{
/* as */ notification in
if let messageEditorSplitViewItem = self.messageEditorSplitViewItem
{
messageEditorSplitViewItem.animator().collapsed = true
}
}
timelineNavigationRequestHandler = timelineNavigationRequestHandler ?? handle(TimelineNavigationRequestNotification)
{
/* as */ notification in
if let messageEditorSplitViewItem = self.messageEditorSplitViewItem
{
messageEditorSplitViewItem.animator().collapsed = false
}
}
//
// MARK: - .SendMessage
//
......
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