 
   onEnter: (nextState, replaceState, done) ->
 
-    { channelName, postId } = nextState.params
+    messageActions.changeSelectedMessage null
+
+    { channelName } = nextState.params
     thread = kd.singletons.reactor.evaluate selectedChannelThread
 
     # if there is no channel name set on the route (/NewChannel, /Channels)

NewPublicChannelRoute = require './newpublicchannel'
AllPublicChannelsRoute = require './allpublicchannels'
PublicChannelNotificationSettingsRoute = require './publicchannelnotificationsettings'

module.exports = class SingleChannelRoute

  constructor: ->

    @path = ':channelName(/:postId)'
    @childRoutes = [
      new NewPublicChannelRoute
      new AllPublicChannelsRoute
      new PublicChannelNotificationSettingsRoute
    ]



        channelName = getGroup().slug

    if channelName
      transitionToChannel channelName, done
    else if not thread
      threadActions.changeSelectedThread null
      done()
