// Path: app/src/main/java/com/crazyhitty/chdev/ks/munch/curatedfeeds/CuratedFeedsPresenter.java
// public class CuratedFeedsPresenter implements ICuratedFeedsPresenter, OnCuratedFeedsRetrievedListener {
//     private ICuratedFeedsView mView;
// 
//     public CuratedFeedsPresenter(ICuratedFeedsView mView) {
//         this.mView = mView;
//     }
// 
//     public void attemptCuratedFeedsLoading(Context context) {
//         CuratedFeedsInteractor curatedFeedsInteractor = new CuratedFeedsInteractor();
//         curatedFeedsInteractor.fetchCuratedFeedsFromServer(this, context);
//     }
// 
//     @Override
//     public void onSuccess(List<SourceItem> sourceItems) {
//         mView.onFeedsLoaded(sourceItems);
//     }
// 
//     @Override
//     public void onFailure(String message) {
//         mView.onFeedsLoadingFailure(message);
//     }
// }
// 
// Path: app/src/main/java/com/crazyhitty/chdev/ks/munch/curatedfeeds/ICuratedFeedsView.java
// public interface ICuratedFeedsView {
//     void onFeedsLoaded(List<SourceItem> sourceItems);
// 
//     void onFeedsLoadingFailure(String message);
// }
// 
// Path: app/src/main/java/com/crazyhitty/chdev/ks/munch/models/SourceItem.java
// public class SourceItem {
//     private String sourceName, sourceUrl, sourceCategoryName, sourceDateAdded;
//     private int sourceCategoryImgId;
// 
//     public int getSourceCategoryImgId() {
//         return sourceCategoryImgId;
//     }
// 
//     public void setSourceCategoryImgId(int sourceCategoryImgId) {
//         this.sourceCategoryImgId = sourceCategoryImgId;
//     }
// 
//     public String getSourceName() {
//         return sourceName;
//     }
// 
//     public void setSourceName(String sourceName) {
//         this.sourceName = sourceName;
//     }
// 
//     public String getSourceUrl() {
//         return sourceUrl;
//     }
// 
//     public void setSourceUrl(String sourceUrl) {
//         this.sourceUrl = sourceUrl;
//     }
// 
//     public String getSourceDateAdded() {
//         return sourceDateAdded;
//     }
// 
//     public void setSourceDateAdded(String sourceDateAdded) {
//         this.sourceDateAdded = sourceDateAdded;
//     }
// 
//     public String getSourceCategoryName() {
//         return sourceCategoryName;
//     }
// 
//     public void setSourceCategoryName(String sourceCategoryName) {
//         this.sourceCategoryName = sourceCategoryName;
//     }
// }


import android.content.Context;
import android.content.SharedPreferences;
import android.preference.MultiSelectListPreference;
import android.preference.Preference;
import android.preference.PreferenceManager;
import android.util.AttributeSet;
import android.util.Log;
import android.widget.Toast;
import com.crazyhitty.chdev.ks.munch.R;
import com.crazyhitty.chdev.ks.munch.curatedfeeds.CuratedFeedsPresenter;
import com.crazyhitty.chdev.ks.munch.curatedfeeds.ICuratedFeedsView;
import com.crazyhitty.chdev.ks.munch.models.SourceItem;
import java.util.List;
import java.util.Set;
package com.crazyhitty.chdev.ks.munch.ui.views;




/**
 * Created by Kartik_ch on 12/29/2015.
 */
public class CustomCheckBoxListPreferenceDialog extends MultiSelectListPreference implements ICuratedFeedsView, Preference.OnPreferenceClickListener {
    private CuratedFeedsPresenter mCuratedFeedsPresenter;

    public CustomCheckBoxListPreferenceDialog(Context context, AttributeSet attrs) {
        super(context, attrs);

        setOnPreferenceClickListener(this);
        if (mCuratedFeedsPresenter == null) {
            mCuratedFeedsPresenter = new CuratedFeedsPresenter(this);
        }

        mCuratedFeedsPresenter.attemptCuratedFeedsLoading(getContext());
    }

    @Override
// Path: app/src/main/java/com/crazyhitty/chdev/ks/munch/curatedfeeds/CuratedFeedsPresenter.java
// public class CuratedFeedsPresenter implements ICuratedFeedsPresenter, OnCuratedFeedsRetrievedListener {
//     private ICuratedFeedsView mView;
// 
//     public CuratedFeedsPresenter(ICuratedFeedsView mView) {
//         this.mView = mView;
//     }
// 
//     public void attemptCuratedFeedsLoading(Context context) {
//         CuratedFeedsInteractor curatedFeedsInteractor = new CuratedFeedsInteractor();
//         curatedFeedsInteractor.fetchCuratedFeedsFromServer(this, context);
//     }
// 
//     @Override
//     public void onSuccess(List<SourceItem> sourceItems) {
//         mView.onFeedsLoaded(sourceItems);
//     }
// 
//     @Override
//     public void onFailure(String message) {
//         mView.onFeedsLoadingFailure(message);
//     }
// }
// 
// Path: app/src/main/java/com/crazyhitty/chdev/ks/munch/curatedfeeds/ICuratedFeedsView.java
// public interface ICuratedFeedsView {
//     void onFeedsLoaded(List<SourceItem> sourceItems);
// 
//     void onFeedsLoadingFailure(String message);
// }
// 
// Path: app/src/main/java/com/crazyhitty/chdev/ks/munch/models/SourceItem.java
// public class SourceItem {
//     private String sourceName, sourceUrl, sourceCategoryName, sourceDateAdded;
//     private int sourceCategoryImgId;
// 
//     public int getSourceCategoryImgId() {
//         return sourceCategoryImgId;
//     }
// 
//     public void setSourceCategoryImgId(int sourceCategoryImgId) {
//         this.sourceCategoryImgId = sourceCategoryImgId;
//     }
// 
//     public String getSourceName() {
//         return sourceName;
//     }
// 
//     public void setSourceName(String sourceName) {
//         this.sourceName = sourceName;
//     }
// 
//     public String getSourceUrl() {
//         return sourceUrl;
//     }
// 
//     public void setSourceUrl(String sourceUrl) {
//         this.sourceUrl = sourceUrl;
//     }
// 
//     public String getSourceDateAdded() {
//         return sourceDateAdded;
//     }
// 
//     public void setSourceDateAdded(String sourceDateAdded) {
//         this.sourceDateAdded = sourceDateAdded;
//     }
// 
//     public String getSourceCategoryName() {
//         return sourceCategoryName;
//     }
// 
//     public void setSourceCategoryName(String sourceCategoryName) {
//         this.sourceCategoryName = sourceCategoryName;
//     }
// }


// Path: app/src/main/java/com/crazyhitty/chdev/ks/munch/ui/views/CustomCheckBoxListPreferenceDialog.java
import android.content.Context;
import android.content.SharedPreferences;
import android.preference.MultiSelectListPreference;
import android.preference.Preference;
import android.preference.PreferenceManager;
import android.util.AttributeSet;
import android.util.Log;
import android.widget.Toast;
import com.crazyhitty.chdev.ks.munch.R;
import com.crazyhitty.chdev.ks.munch.curatedfeeds.CuratedFeedsPresenter;
import com.crazyhitty.chdev.ks.munch.curatedfeeds.ICuratedFeedsView;
import com.crazyhitty.chdev.ks.munch.models.SourceItem;
import java.util.List;
import java.util.Set;

package com.crazyhitty.chdev.ks.munch.ui.views;




/**
 * Created by Kartik_ch on 12/29/2015.
 */
public class CustomCheckBoxListPreferenceDialog extends MultiSelectListPreference implements ICuratedFeedsView, Preference.OnPreferenceClickListener {
    private CuratedFeedsPresenter mCuratedFeedsPresenter;

    public CustomCheckBoxListPreferenceDialog(Context context, AttributeSet attrs) {
        super(context, attrs);

        setOnPreferenceClickListener(this);
        if (mCuratedFeedsPresenter == null) {
            mCuratedFeedsPresenter = new CuratedFeedsPresenter(this);
        }

        mCuratedFeedsPresenter.attemptCuratedFeedsLoading(getContext());
    }

    @Override
    public void onFeedsLoaded(List<SourceItem> sourceItems) {