|
|
|
@ -256,6 +256,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
private ImageView ivThread;
|
|
|
|
|
private TextView tvPreview;
|
|
|
|
|
private TextView tvError;
|
|
|
|
|
private Button btnHelp;
|
|
|
|
|
private ContentLoadingProgressBar pbLoading;
|
|
|
|
|
|
|
|
|
|
private View vsBody;
|
|
|
|
@ -364,6 +365,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
tvCount = itemView.findViewById(R.id.tvCount);
|
|
|
|
|
ivThread = itemView.findViewById(R.id.ivThread);
|
|
|
|
|
tvError = itemView.findViewById(R.id.tvError);
|
|
|
|
|
btnHelp = itemView.findViewById(R.id.btnHelp);
|
|
|
|
|
pbLoading = itemView.findViewById(R.id.pbLoading);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -498,6 +500,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
ibFlagged.setOnClickListener(this);
|
|
|
|
|
if (viewType == ViewType.THREAD)
|
|
|
|
|
ibFlagged.setOnLongClickListener(this);
|
|
|
|
|
btnHelp.setOnClickListener(this);
|
|
|
|
|
|
|
|
|
|
if (vsBody != null) {
|
|
|
|
|
ibExpanderAddress.setOnClickListener(this);
|
|
|
|
@ -547,6 +550,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
ibFlagged.setOnClickListener(null);
|
|
|
|
|
if (viewType == ViewType.THREAD)
|
|
|
|
|
ibFlagged.setOnLongClickListener(null);
|
|
|
|
|
btnHelp.setOnClickListener(null);
|
|
|
|
|
|
|
|
|
|
if (vsBody != null) {
|
|
|
|
|
ibExpanderAddress.setOnClickListener(null);
|
|
|
|
@ -593,6 +597,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
ivThread.setVisibility(View.GONE);
|
|
|
|
|
tvPreview.setVisibility(View.GONE);
|
|
|
|
|
tvError.setVisibility(View.GONE);
|
|
|
|
|
btnHelp.setVisibility(View.GONE);
|
|
|
|
|
pbLoading.setVisibility(View.VISIBLE);
|
|
|
|
|
|
|
|
|
|
clearExpanded(null);
|
|
|
|
@ -787,6 +792,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
} else {
|
|
|
|
|
tvError.setText(error);
|
|
|
|
|
tvError.setVisibility(error == null ? View.GONE : View.VISIBLE);
|
|
|
|
|
btnHelp.setVisibility(error == null ? View.GONE : View.VISIBLE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Contact info
|
|
|
|
@ -1478,6 +1484,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
onShowSnoozed(message);
|
|
|
|
|
else if (view.getId() == R.id.ibFlagged)
|
|
|
|
|
onToggleFlag(message);
|
|
|
|
|
else if (view.getId() == R.id.btnHelp)
|
|
|
|
|
onHelp(message);
|
|
|
|
|
else if (view.getId() == R.id.ibSearchContact)
|
|
|
|
|
onSearchContact(message);
|
|
|
|
|
else if (view.getId() == R.id.ibNotifyContact)
|
|
|
|
@ -1745,6 +1753,10 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
}.execute(context, owner, args, "message:flag");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void onHelp(TupleMessageEx message) {
|
|
|
|
|
Helper.viewFAQ(context, 22);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void onSearchContact(TupleMessageEx message) {
|
|
|
|
|
Bundle args = new Bundle();
|
|
|
|
|
args.putLong("id", message.id);
|
|
|
|
|