// Path: src/main/java/de/e621/rebane/components/listadapter/BlipListAdapter.java
// public class BlipListAdapter extends XMLListAdapter {
//     FilterManager blacklist;
//     String baseURL;
//     boolean postLoad;
//     public int getLastPage(int pagesize) {
//         return 100;
//     } //can't be retrieved
// 
//     public BlipListAdapter(Context context, int textViewResourceId, List<XMLNode> rowDataList, String baseURL, FilterManager avatarFilter, boolean postLoadUserdata) {
//         super(context, textViewResourceId, rowDataList);
//         CommentViewHolder.resetAuthorData();
//         blacklist = avatarFilter;
//         this.baseURL = baseURL;
//         postLoad = postLoadUserdata;
//         svNumPosts=Integer.MAX_VALUE;
//     }
// 
//     public View getView(final int position, View convertView, ViewGroup parent) {
// 
//         BlipViewHolder holder = new BlipViewHolder(getContext(), baseURL, blacklist, postLoad, this);
//         LayoutInflater inflator = LayoutInflater.from(parent.getContext());
//         convertView = inflator.inflate(R.layout.blip_layout, parent, false);
// 
//         holder.populate(position, convertView, list.get(position));
// 
//         //return the row view.
//         return convertView;
//     }
// }


import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.app.ActionBar;
import android.view.View;
import com.itwookie.XMLreader.XMLNode;
import de.e621.rebane.a621.R;
import de.e621.rebane.components.listadapter.BlipListAdapter;


        postLoadUserdata = Boolean.parseBoolean(database.getValue(SettingsActivity.SETTINGFANCYCOMMENTS));
    }

    @Override void setPagesize() {
        pagesize = 50; //given by API
    }

    @Override
    public void onSaveInstanceState(Bundle outState){
        super.onSaveInstanceState(outState);
        outState.putInt(BLIPQUERYPAGE, page);
    }

    @Override
    void handleIntent(Intent intent) {
        super.handleIntent(intent);
        page = intent.getIntExtra(BLIPQUERYPAGE,1);

        if (results==null) searchPosts("", page);
    }

    @Override void searchPosts(String escapedQuery, int page) {
        API_URI = "blip/index.xml?page="+page;
        API_LOGIN = false;

        super.searchPosts(escapedQuery, page);
    }

    @Override void onSearchResult(XMLNode result, String query, int page) {

// Path: src/main/java/de/e621/rebane/components/listadapter/BlipListAdapter.java
// public class BlipListAdapter extends XMLListAdapter {
//     FilterManager blacklist;
//     String baseURL;
//     boolean postLoad;
//     public int getLastPage(int pagesize) {
//         return 100;
//     } //can't be retrieved
// 
//     public BlipListAdapter(Context context, int textViewResourceId, List<XMLNode> rowDataList, String baseURL, FilterManager avatarFilter, boolean postLoadUserdata) {
//         super(context, textViewResourceId, rowDataList);
//         CommentViewHolder.resetAuthorData();
//         blacklist = avatarFilter;
//         this.baseURL = baseURL;
//         postLoad = postLoadUserdata;
//         svNumPosts=Integer.MAX_VALUE;
//     }
// 
//     public View getView(final int position, View convertView, ViewGroup parent) {
// 
//         BlipViewHolder holder = new BlipViewHolder(getContext(), baseURL, blacklist, postLoad, this);
//         LayoutInflater inflator = LayoutInflater.from(parent.getContext());
//         convertView = inflator.inflate(R.layout.blip_layout, parent, false);
// 
//         holder.populate(position, convertView, list.get(position));
// 
//         //return the row view.
//         return convertView;
//     }
// }


// Path: src/main/java/de/e621/rebane/activities/BlipsActivity.java
import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.app.ActionBar;
import android.view.View;
import com.itwookie.XMLreader.XMLNode;
import de.e621.rebane.a621.R;
import de.e621.rebane.components.listadapter.BlipListAdapter;


        postLoadUserdata = Boolean.parseBoolean(database.getValue(SettingsActivity.SETTINGFANCYCOMMENTS));
    }

    @Override void setPagesize() {
        pagesize = 50; //given by API
    }

    @Override
    public void onSaveInstanceState(Bundle outState){
        super.onSaveInstanceState(outState);
        outState.putInt(BLIPQUERYPAGE, page);
    }

    @Override
    void handleIntent(Intent intent) {
        super.handleIntent(intent);
        page = intent.getIntExtra(BLIPQUERYPAGE,1);

        if (results==null) searchPosts("", page);
    }

    @Override void searchPosts(String escapedQuery, int page) {
        API_URI = "blip/index.xml?page="+page;
        API_LOGIN = false;

        super.searchPosts(escapedQuery, page);
    }

    @Override void onSearchResult(XMLNode result, String query, int page) {

        results = new BlipListAdapter(getApplicationContext(), R.id.lblTitle, result.getChildren(), baseURL, blacklist, postLoadUserdata);
