// Path: example/src/main/java/im/getsocial/demo/dialog/action_dialog/ActionDialog.java
// public class ActionDialog {
// 	private final List<Action> _actionList;
// 	private final AlertDialog.Builder _dialog;
// 
// 	public ActionDialog(Context context) {
// 		_dialog = new AlertDialog.Builder(context)
// 				.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
// 					@Override
// 					public void onClick(DialogInterface dialogInterface, int i) {
// 						dialogInterface.dismiss();
// 					}
// 				});
// 		_actionList = new ArrayList<>();
// 	}
// 
// 	public ActionDialog addAction(Action action) {
// 		_actionList.add(action);
// 		return this;
// 	}
// 
// 	public ActionDialog addActions(List<Action> actions) {
// 		_actionList.addAll(actions);
// 		return this;
// 	}
// 
// 	public ActionDialog setTitle(String title) {
// 		_dialog.setTitle(title);
// 		return this;
// 	}
// 
// 	public void show() {
// 		List<String> items = new ArrayList<>(_actionList.size());
// 		for (Action action : _actionList) {
// 			items.add(action._title);
// 		}
// 		_dialog.setItems(items.toArray(new String[items.size()]),
// 				new DialogInterface.OnClickListener() {
// 					@Override
// 					public void onClick(DialogInterface dialogInterface, int i) {
// 						_actionList.get(i).execute();
// 						dialogInterface.dismiss();
// 					}
// 				})
// 				.show();
// 	}
// 
// 	public abstract static class Action {
// 		private final String _title;
// 
// 		public Action(String title) {
// 			_title = title;
// 		}
// 
// 		public abstract void execute();
// 	}
// 
// }


import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.NonNull;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.squareup.picasso.Picasso;
import im.getsocial.demo.R;
import im.getsocial.demo.dialog.action_dialog.ActionDialog;
import im.getsocial.sdk.Communities;
import im.getsocial.sdk.GetSocial;
import im.getsocial.sdk.communities.ActivitiesQuery;
import im.getsocial.sdk.communities.FollowQuery;
import im.getsocial.sdk.communities.User;
import im.getsocial.sdk.communities.UserId;
import im.getsocial.sdk.communities.UserIdList;
import im.getsocial.sdk.ui.communities.ActivityFeedViewBuilder;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
		@BindView(R.id.user_description)
		TextView _description;

		@BindView(R.id.user_avatar)
		ImageView _avatar;

		UserViewHolder(final View view) {
			super(view);
		}

		@Override
		protected void bind(final View itemView) {
			ButterKnife.bind(this, itemView);
		}

		@OnClick(R.id.actions)
		public void openActinos() {
			final String userId = _item.getId();
			final ActionDialog dialog = new ActionDialog(getContext());
			dialog.addAction(new ActionDialog.Action("Followers") {
				@Override
				public void execute() {
					final UsersFollowersFragment fragment = UsersFollowersFragment.create(_item.getId(), _item.getDisplayName());
					addContentFragment(fragment);
				}
			});
			// if not current user
			if (!GetSocial.getCurrentUser().getId().equals(userId)) {
				dialog.addAction(new ActionDialog.Action(isFriend(userId) ? "Remove Friend" : "Add Friend") {
					@Override
// Path: example/src/main/java/im/getsocial/demo/dialog/action_dialog/ActionDialog.java
// public class ActionDialog {
// 	private final List<Action> _actionList;
// 	private final AlertDialog.Builder _dialog;
// 
// 	public ActionDialog(Context context) {
// 		_dialog = new AlertDialog.Builder(context)
// 				.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
// 					@Override
// 					public void onClick(DialogInterface dialogInterface, int i) {
// 						dialogInterface.dismiss();
// 					}
// 				});
// 		_actionList = new ArrayList<>();
// 	}
// 
// 	public ActionDialog addAction(Action action) {
// 		_actionList.add(action);
// 		return this;
// 	}
// 
// 	public ActionDialog addActions(List<Action> actions) {
// 		_actionList.addAll(actions);
// 		return this;
// 	}
// 
// 	public ActionDialog setTitle(String title) {
// 		_dialog.setTitle(title);
// 		return this;
// 	}
// 
// 	public void show() {
// 		List<String> items = new ArrayList<>(_actionList.size());
// 		for (Action action : _actionList) {
// 			items.add(action._title);
// 		}
// 		_dialog.setItems(items.toArray(new String[items.size()]),
// 				new DialogInterface.OnClickListener() {
// 					@Override
// 					public void onClick(DialogInterface dialogInterface, int i) {
// 						_actionList.get(i).execute();
// 						dialogInterface.dismiss();
// 					}
// 				})
// 				.show();
// 	}
// 
// 	public abstract static class Action {
// 		private final String _title;
// 
// 		public Action(String title) {
// 			_title = title;
// 		}
// 
// 		public abstract void execute();
// 	}
// 
// }


// Path: example/src/main/java/im/getsocial/demo/fragment/BaseUsersListFragment.java
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.NonNull;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.squareup.picasso.Picasso;
import im.getsocial.demo.R;
import im.getsocial.demo.dialog.action_dialog.ActionDialog;
import im.getsocial.sdk.Communities;
import im.getsocial.sdk.GetSocial;
import im.getsocial.sdk.communities.ActivitiesQuery;
import im.getsocial.sdk.communities.FollowQuery;
import im.getsocial.sdk.communities.User;
import im.getsocial.sdk.communities.UserId;
import im.getsocial.sdk.communities.UserIdList;
import im.getsocial.sdk.ui.communities.ActivityFeedViewBuilder;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

		@BindView(R.id.user_description)
		TextView _description;

		@BindView(R.id.user_avatar)
		ImageView _avatar;

		UserViewHolder(final View view) {
			super(view);
		}

		@Override
		protected void bind(final View itemView) {
			ButterKnife.bind(this, itemView);
		}

		@OnClick(R.id.actions)
		public void openActinos() {
			final String userId = _item.getId();
			final ActionDialog dialog = new ActionDialog(getContext());
			dialog.addAction(new ActionDialog.Action("Followers") {
				@Override
				public void execute() {
					final UsersFollowersFragment fragment = UsersFollowersFragment.create(_item.getId(), _item.getDisplayName());
					addContentFragment(fragment);
				}
			});
			// if not current user
			if (!GetSocial.getCurrentUser().getId().equals(userId)) {
				dialog.addAction(new ActionDialog.Action(isFriend(userId) ? "Remove Friend" : "Add Friend") {
					@Override
					public void execute() {