                @state.edited_message != next_state.edited_message or
                ((not @props.is_prev_sender) and (@props.sender_name != next.sender_name))
 
-    #componentWillUpdate: ->
-    #    console.log('component will update is called')
-    #componentDidMount: ->
-        #console.log(@props.edited_input)
-        #@props.action.set_edited_input('')
-
-    #componentDidUpdate: ->
-     #   console.log(@props.edited_input)
-    #    @props.actions.set_edited_input('this changed from a test')
-    #    console.log(@props.edited_input)
-        #if @refs.editedMessage?
-            #console.log(@props.edited_input)
-            #@props.action.set_edited_input('testing')
-            #if @state.edited_message == @refs.editedMessage.getValue()
-                #console.log('component did update is called', @state.edited_message)
-                #@setState(edited_message: @refs.editedMessage.getValue())
-                #console.log('component did update after call', @state.edited_message)
-
     #componentWillUnmount: () ->
     #    @props.actions.set_editing(@props.message, false)
 
     newest_content: ->
         @props.message.get('history').peek()?.get('content') ? ''
 
+    is_editing: ->
+        @props.message.get('editing').has(@props.account_id)
+
     sender_is_viewer: ->
         @props.account_id == @props.message.get('sender_id')
 
     get_timeago: ->
-        <div className="pull-right small" style={color:'#888'}>
+        <div className="pull-right small" style={color:'#888', marginTop:'-8px', marginBottom:'1px'}>
             <TimeAgo date={new Date(@props.message.get('date'))} />
         </div>
 
-    show_history: ->
-        <div className="small" style={color:'#888', position:'absolute', left:'500px'} onClick={@enable_history}>
-            <Icon name='history'/>
-        </div>
-
-    hide_history: ->
-        <div className="small" style={color:'#888', position:'absolute', left:'500px'} onClick={@disable_history}>
-            <Icon name='history'/>
-        </div>
-
-    disable_history: ->
-        @props.actions.set_show_history(@props.message, false)
-
-    enable_history: ->
-        @props.actions.set_show_history(@props.message, true)
-
-    show_user_name: ->
-        <div className={"small"} style={color:"#888", marginBottom:'1px', marginLeft:'10px'}>
-            {@props.sender_name}
-        </div>
-
-    is_editing: ->
-        @props.message.get('editing').has(@props.account_id)
-
     editing_status: ->
         other_editors = @props.message.get('editing').remove(@props.account_id).keySeq()
-        current_user = @props.user_map.get(@props.account_id).get('first_name') + ' ' + @props.user_map.get(@props.account_id).get('last_name')
         if @is_editing()
             if other_editors.size == 1
                 # This user and someone else is also editing

            is_equal: (a, b) => (a - 0) == (b - 0)
        @syncdb.save()

    set_show_history: (message, is_history) =>
        if not @syncdb?
            # TODO: give an error or try again later?
            return
        author_id = @redux.getStore('account').get_account_id()

        if is_history
            show_history = message.get('show_history').set(author_id, 'true')
        else
            show_history = message.get('show_history').remove(author_id)

        @syncdb.update
            set :
                show_history : show_history.toJS()
            where :
                date: message.get('date')
            is_equal: (a, b) => (a - 0) == (b - 0)
        @syncdb.save()

    set_to_last_input: =>
        @setState(input:@redux.getStore(@name).get('last_sent'))

    set_input: (input) =>
        @setState(input:input)

    #set_edited_input: (edited_input) =>
    #    @setState(edited_input:edited_input)

    save_scroll_state: (position, height, offset) =>
        # height == 0 means chat room is not rendered
        if height != 0
            @setState(saved_position:position, height:height, offset:offset)

# boilerplate setting up actions, stores, sync'd file, etc.
syncdbs = {}

            # Up arrow on an empty input
            @props.actions.set_to_last_input()

    send_chat: (e) ->
        @scroll_to_bottom()
        e.preventDefault()
