     showItemMenu   : yes
 
 
+  flag: (key) -> @props.thread?.getIn ['flags', key]
+  channel: (key) -> @props.thread?.getIn ['channel', key]
+
+
+  componentDidMount: ->
+
+    scroller = React.findDOMNode @refs.scrollContainer
+    scrollTop = @flag 'scrollPosition'
+
+    scroller.scrollTop  = scrollTop  if scrollTop
+    kd.utils.wait 50, -> _showScroller scroller
+
+
+  componentWillUnmount: ->
+
+    scroller = React.findDOMNode @refs.scrollContainer
+
+    { scrollTop } = scroller
+    { channel }   = ActivityFlux.actions
+
+    _hideScroller scroller
+    channel.setScrollPosition (@channel 'id'), scrollTop
+
+
   componentWillUpdate: (nextProps, nextState) ->
 
     return  unless nextProps?.thread
 
     { thread } = nextProps
 
-    isMessageBeingSubmitted = thread.getIn ['flags', 'isMessageBeingSubmitted']
+    isMessageBeingSubmitted = @flag 'isMessageBeingSubmitted'
 
     @shouldScrollToBottom = yes  if isMessageBeingSubmitted
-
-    scrollContainer = React.findDOMNode @refs.scrollContainer
 
 
   onTopThresholdReached: (event) ->



  render: ->

    <div className={@getClassName()}>
      <section className="ChatPane-contentWrapper">
        <section className="ChatPane-body" ref="ChatPaneBody">
          {@renderBody()}

    kd.utils.wait 500, => @props.onLoadMore()


  renderChannelInfoContainer: ->

    return null  unless @props.thread

    messagesSize        = @props.thread.get('messages').size
    scrollContainer     = React.findDOMNode @refs.scrollContainer
    reachedFirstMessage = @flag 'reachedFirstMessage'

    if not reachedFirstMessage
      return null

    <ChannelInfoContainer
