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