   # slug: [slug|id|name]
   open: (type, slug) ->
 
-    {socialapi, router, notificationController, mainView} = KD.singletons
+    {socialapi, router, notificationController} = KD.singletons
+
 
     kallback = (data) =>
-
       name = if slug then "#{type}-#{slug}" else type
       pane = @tabs.getPaneByName name
 

      then @tabs.showPane pane
      else @createTab name, data

    mainView.ready =>

      @sidebar.selectItemByRouteOptions type, slug
      item = @sidebar.selectedItem

      if not item
        type_ = switch type
          when 'message' then 'privatemessage'
          when 'post'    then 'activity'
          else type

        socialapi.cacheable type_, slug, (err, data) =>
          if err then router.handleNotFound router.getCurrentPath()
          else
            @sidebar.addItem data
            kallback data

      else
        kallback item.getData()


  openNext: ->

    # @addSubView @groupHeader  unless isKoding()
    # @addSubView @sidebar
    { mainView } = KD.singletons
    @sidebar     = mainView.activitySidebar
    @addSubView @tabs


