@Override
  public View getView(int position, View view, ViewGroup parent) {

    Category category = new Category();
    if (categories.size() == 0) {
      getCategories(getData());
    }
    category = getCategory(position);

    if (category != null) {
      view = inflater.inflate(R.layout.list_item_recent_threads_category, parent, false);
      TextView tv = (TextView) view.findViewById(R.id.chat_separator);
      tv.setText(category.getText() + " (" + category.getItemCount() + ")");
      return fillView(view, position);
    } else {
      view = inflater.inflate(R.layout.list_item_recent_threads, null);
      return fillView(view, position);
    }
  }