             
               if err
                 console.log "no leaf channel found for #{options.rootId}, #{data}"
-            
-        
-          
-
+                
+         
+  createLeafChannelSetting: (data)->
     @settings.addSubView @removeLabel = new KDCustomHTMLView
       cssClass: 'solid compact hidden'
       partial : '<span class="label">Leaf Channels</span>'

          kd.singletons.socialapi.moderation.blacklist options, (err, data) =>
            if err
              console.log "no leaf channel found for #{data.id}, #{data.name}"

    else
      options = 
        rootId  : kd.singletons.groupsController.getCurrentGroup().socialApiChannelId
        leafId  : data.id
      
      kd.singletons.socialapi.moderation.fetchRoot options, (err, rootChannel) =>
        if err 
          return console.log "err while fething root", err
        

              console.log "no leaf channel found for #{data.id}, #{data.name}"
            @similarChannelsListController.removeItem item
            @listLeafChannels [item.getData()]


  createLeafItemViews: (data) ->
    options = rootId  :  data.id
          
    kd.singletons.socialapi.moderation.list options, (err, channels) =>
      if err
        console.log "no leaf channel found for #{data.id}, #{data.name}"
      @listLeafChannels channels
      if channels.length > 0
        @removeButton.show()
        @removeLabel.show()
      
      
  listLeafChannels: (channels) ->
    
    @leafChannelsListController.hideLazyLoader()
    return  unless channels?.length

    
    @leafSkip += channels.length

    for channel in channels
      @leafChannelsListController.addItem channel

    @leafChannelsListController.hideLazyLoader()
    if @leafChannelsListController.getItemCount() > 0
      @removeButton.show()

            
  searchSimilarChannels: ->

    @similarSkip  = 0
