// Path: app/src/main/java/io/github/kobakei/anago/adapter/IssueAdapter.java
// public class IssueAdapter extends ArrayAdapter<Issue> {
// 
//     private final FragmentComponent injector;
// 
//     /**
//      * コンストラクタ
//      * @param context
//      * @param injector
//      * @param items
//      */
//     public IssueAdapter(Context context, FragmentComponent injector, ObservableArrayList<Issue> items) {
//         super(context, 0, items);
// 
//         this.injector = injector;
// 
//         items.addOnListChangedCallback(new ObservableList.OnListChangedCallback<ObservableList<Issue>>() {
//             @Override
//             public void onChanged(ObservableList<Issue> issues) {
//                 notifyDataSetChanged();
//             }
// 
//             @Override
//             public void onItemRangeChanged(ObservableList<Issue> issues, int i, int i1) {
//                 notifyDataSetChanged();
//             }
// 
//             @Override
//             public void onItemRangeInserted(ObservableList<Issue> issues, int i, int i1) {
//                 notifyDataSetChanged();
//             }
// 
//             @Override
//             public void onItemRangeMoved(ObservableList<Issue> issues, int i, int i1, int i2) {
//                 notifyDataSetChanged();
//             }
// 
//             @Override
//             public void onItemRangeRemoved(ObservableList<Issue> issues, int i, int i1) {
//                 notifyDataSetChanged();
//             }
//         });
//     }
// 
//     @NonNull
//     @Override
//     public View getView(int position, View convertView, ViewGroup parent) {
//         IssueListItemBinding binding;
//         if (convertView == null) {
//             binding = DataBindingUtil.inflate(LayoutInflater.from(getContext()), R.layout.issue_list_item, parent, false);
//             binding.setViewModel(injector.issueListItemViewModel());
//         } else {
//             binding = DataBindingUtil.getBinding(convertView);
//         }
// 
//         IssueListItemViewModel viewModel = binding.getViewModel();
//         viewModel.issue.set(getItem(position));
// 
//         return binding.getRoot();
//     }
// }
// 
// Path: app/src/main/java/io/github/kobakei/anago/viewmodel/IssueListFragmentViewModel.java
// public class IssueListFragmentViewModel extends FragmentViewModel {
// 
//     private final GetIssuesUseCase getIssuesUseCase;
//     private final EventBus eventBus;
// 
//     public ObservableArrayList<Issue> issues;
// 
//     private String user;
//     private String repo;
// 
//     @Inject
//     public IssueListFragmentViewModel(BaseFragment fragment, GetIssuesUseCase getIssuesUseCase,
//                                       EventBus eventBus) {
//         super(fragment);
//         this.getIssuesUseCase = getIssuesUseCase;
//         this.eventBus = eventBus;
// 
//         this.issues = new ObservableArrayList<>();
//     }
// 
//     @Override
//     public void onStart() {
// 
//     }
// 
//     @Override
//     public void onResume() {
//         eventBus.register(this);
//         refresh("open");
//     }
// 
//     @Override
//     public void onPause() {
//         eventBus.unregister(this);
//     }
// 
//     @Override
//     public void onStop() {
// 
//     }
// 
//     public void setRepo(String user, String repo) {
//         this.user = user;
//         this.repo = repo;
//     }
// 
//     @Subscribe
//     public void onShowAllIssuesEvent(RepoActivityViewModel.ShowAllIssuesEvent event) {
//         refresh("all");
//     }
// 
//     private void refresh(String state) {
//         getIssuesUseCase.run(user, repo, state)
//                 .compose(bindToLifecycle().forSingle())
//                 .subscribeOn(Schedulers.io())
//                 .observeOn(AndroidSchedulers.mainThread())
//                 .subscribe(issues -> {
//                     this.issues.clear();
//                     this.issues.addAll(issues);
//                 }, throwable -> {
//                     Timber.e(throwable);
//                 });
//     }
// }


import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import javax.inject.Inject;
import io.github.kobakei.anago.R;
import io.github.kobakei.anago.adapter.IssueAdapter;
import io.github.kobakei.anago.databinding.IssueListFragmentBinding;
import io.github.kobakei.anago.viewmodel.IssueListFragmentViewModel;
package io.github.kobakei.anago.fragment;





/**
 * イシュー画面
 */
public class IssueListFragment extends BaseFragment {

    private static final String ARG_USER = "user";
    private static final String ARG_REPO = "repo";

    @Inject
    IssueListFragmentViewModel viewModel;

    public IssueListFragment() {
        // Required empty public constructor
    }

    public static IssueListFragment newInstance(String param1, String param2) {
        IssueListFragment fragment = new IssueListFragment();
// Path: app/src/main/java/io/github/kobakei/anago/adapter/IssueAdapter.java
// public class IssueAdapter extends ArrayAdapter<Issue> {
// 
//     private final FragmentComponent injector;
// 
//     /**
//      * コンストラクタ
//      * @param context
//      * @param injector
//      * @param items
//      */
//     public IssueAdapter(Context context, FragmentComponent injector, ObservableArrayList<Issue> items) {
//         super(context, 0, items);
// 
//         this.injector = injector;
// 
//         items.addOnListChangedCallback(new ObservableList.OnListChangedCallback<ObservableList<Issue>>() {
//             @Override
//             public void onChanged(ObservableList<Issue> issues) {
//                 notifyDataSetChanged();
//             }
// 
//             @Override
//             public void onItemRangeChanged(ObservableList<Issue> issues, int i, int i1) {
//                 notifyDataSetChanged();
//             }
// 
//             @Override
//             public void onItemRangeInserted(ObservableList<Issue> issues, int i, int i1) {
//                 notifyDataSetChanged();
//             }
// 
//             @Override
//             public void onItemRangeMoved(ObservableList<Issue> issues, int i, int i1, int i2) {
//                 notifyDataSetChanged();
//             }
// 
//             @Override
//             public void onItemRangeRemoved(ObservableList<Issue> issues, int i, int i1) {
//                 notifyDataSetChanged();
//             }
//         });
//     }
// 
//     @NonNull
//     @Override
//     public View getView(int position, View convertView, ViewGroup parent) {
//         IssueListItemBinding binding;
//         if (convertView == null) {
//             binding = DataBindingUtil.inflate(LayoutInflater.from(getContext()), R.layout.issue_list_item, parent, false);
//             binding.setViewModel(injector.issueListItemViewModel());
//         } else {
//             binding = DataBindingUtil.getBinding(convertView);
//         }
// 
//         IssueListItemViewModel viewModel = binding.getViewModel();
//         viewModel.issue.set(getItem(position));
// 
//         return binding.getRoot();
//     }
// }
// 
// Path: app/src/main/java/io/github/kobakei/anago/viewmodel/IssueListFragmentViewModel.java
// public class IssueListFragmentViewModel extends FragmentViewModel {
// 
//     private final GetIssuesUseCase getIssuesUseCase;
//     private final EventBus eventBus;
// 
//     public ObservableArrayList<Issue> issues;
// 
//     private String user;
//     private String repo;
// 
//     @Inject
//     public IssueListFragmentViewModel(BaseFragment fragment, GetIssuesUseCase getIssuesUseCase,
//                                       EventBus eventBus) {
//         super(fragment);
//         this.getIssuesUseCase = getIssuesUseCase;
//         this.eventBus = eventBus;
// 
//         this.issues = new ObservableArrayList<>();
//     }
// 
//     @Override
//     public void onStart() {
// 
//     }
// 
//     @Override
//     public void onResume() {
//         eventBus.register(this);
//         refresh("open");
//     }
// 
//     @Override
//     public void onPause() {
//         eventBus.unregister(this);
//     }
// 
//     @Override
//     public void onStop() {
// 
//     }
// 
//     public void setRepo(String user, String repo) {
//         this.user = user;
//         this.repo = repo;
//     }
// 
//     @Subscribe
//     public void onShowAllIssuesEvent(RepoActivityViewModel.ShowAllIssuesEvent event) {
//         refresh("all");
//     }
// 
//     private void refresh(String state) {
//         getIssuesUseCase.run(user, repo, state)
//                 .compose(bindToLifecycle().forSingle())
//                 .subscribeOn(Schedulers.io())
//                 .observeOn(AndroidSchedulers.mainThread())
//                 .subscribe(issues -> {
//                     this.issues.clear();
//                     this.issues.addAll(issues);
//                 }, throwable -> {
//                     Timber.e(throwable);
//                 });
//     }
// }


// Path: app/src/main/java/io/github/kobakei/anago/fragment/IssueListFragment.java
import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import javax.inject.Inject;
import io.github.kobakei.anago.R;
import io.github.kobakei.anago.adapter.IssueAdapter;
import io.github.kobakei.anago.databinding.IssueListFragmentBinding;
import io.github.kobakei.anago.viewmodel.IssueListFragmentViewModel;

package io.github.kobakei.anago.fragment;





/**
 * イシュー画面
 */
public class IssueListFragment extends BaseFragment {

    private static final String ARG_USER = "user";
    private static final String ARG_REPO = "repo";

    @Inject
    IssueListFragmentViewModel viewModel;

    public IssueListFragment() {
        // Required empty public constructor
    }

    public static IssueListFragment newInstance(String param1, String param2) {
        IssueListFragment fragment = new IssueListFragment();
        Bundle args = new Bundle();