|
|
@ -304,6 +304,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
|
|
|
|
|
|
|
private ImageButton ibFull;
|
|
|
|
private ImageButton ibFull;
|
|
|
|
private ImageButton ibImages;
|
|
|
|
private ImageButton ibImages;
|
|
|
|
|
|
|
|
private ImageButton ibUnsubscribe;
|
|
|
|
private ImageButton ibDecrypt;
|
|
|
|
private ImageButton ibDecrypt;
|
|
|
|
|
|
|
|
|
|
|
|
private TextView tvBody;
|
|
|
|
private TextView tvBody;
|
|
|
@ -447,6 +448,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
|
|
|
|
|
|
|
ibFull = vsBody.findViewById(R.id.ibFull);
|
|
|
|
ibFull = vsBody.findViewById(R.id.ibFull);
|
|
|
|
ibImages = vsBody.findViewById(R.id.ibImages);
|
|
|
|
ibImages = vsBody.findViewById(R.id.ibImages);
|
|
|
|
|
|
|
|
ibUnsubscribe = vsBody.findViewById(R.id.ibUnsubscribe);
|
|
|
|
ibDecrypt = vsBody.findViewById(R.id.ibDecrypt);
|
|
|
|
ibDecrypt = vsBody.findViewById(R.id.ibDecrypt);
|
|
|
|
|
|
|
|
|
|
|
|
tvBody = vsBody.findViewById(R.id.tvBody);
|
|
|
|
tvBody = vsBody.findViewById(R.id.tvBody);
|
|
|
@ -516,6 +518,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
|
|
|
|
|
|
|
ibFull.setOnClickListener(this);
|
|
|
|
ibFull.setOnClickListener(this);
|
|
|
|
ibImages.setOnClickListener(this);
|
|
|
|
ibImages.setOnClickListener(this);
|
|
|
|
|
|
|
|
ibUnsubscribe.setOnClickListener(this);
|
|
|
|
ibDecrypt.setOnClickListener(this);
|
|
|
|
ibDecrypt.setOnClickListener(this);
|
|
|
|
|
|
|
|
|
|
|
|
tvBody.setOnTouchListener(this);
|
|
|
|
tvBody.setOnTouchListener(this);
|
|
|
@ -566,6 +569,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
|
|
|
|
|
|
|
ibFull.setOnClickListener(null);
|
|
|
|
ibFull.setOnClickListener(null);
|
|
|
|
ibImages.setOnClickListener(null);
|
|
|
|
ibImages.setOnClickListener(null);
|
|
|
|
|
|
|
|
ibUnsubscribe.setOnClickListener(null);
|
|
|
|
ibDecrypt.setOnClickListener(null);
|
|
|
|
ibDecrypt.setOnClickListener(null);
|
|
|
|
|
|
|
|
|
|
|
|
tvBody.setOnTouchListener(null);
|
|
|
|
tvBody.setOnTouchListener(null);
|
|
|
@ -910,6 +914,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
|
|
|
|
|
|
|
ibFull.setVisibility(View.GONE);
|
|
|
|
ibFull.setVisibility(View.GONE);
|
|
|
|
ibImages.setVisibility(View.GONE);
|
|
|
|
ibImages.setVisibility(View.GONE);
|
|
|
|
|
|
|
|
ibUnsubscribe.setVisibility(View.GONE);
|
|
|
|
ibDecrypt.setVisibility(View.GONE);
|
|
|
|
ibDecrypt.setVisibility(View.GONE);
|
|
|
|
|
|
|
|
|
|
|
|
tvBody.setVisibility(View.GONE);
|
|
|
|
tvBody.setVisibility(View.GONE);
|
|
|
@ -978,6 +983,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
|
|
|
|
|
|
|
ibFull.setVisibility(View.GONE);
|
|
|
|
ibFull.setVisibility(View.GONE);
|
|
|
|
ibImages.setVisibility(View.GONE);
|
|
|
|
ibImages.setVisibility(View.GONE);
|
|
|
|
|
|
|
|
ibUnsubscribe.setVisibility(message.unsubscribe == null ? View.GONE : View.VISIBLE);
|
|
|
|
|
|
|
|
|
|
|
|
if (textSize != 0) {
|
|
|
|
if (textSize != 0) {
|
|
|
|
float size = properties.getSize(message.id, textSize);
|
|
|
|
float size = properties.getSize(message.id, textSize);
|
|
|
@ -1512,6 +1518,9 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
case R.id.ibImages:
|
|
|
|
case R.id.ibImages:
|
|
|
|
onShowImages(message);
|
|
|
|
onShowImages(message);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case R.id.ibUnsubscribe:
|
|
|
|
|
|
|
|
onActionUnsubscribe(message);
|
|
|
|
|
|
|
|
break;
|
|
|
|
case R.id.ibDecrypt:
|
|
|
|
case R.id.ibDecrypt:
|
|
|
|
onActionDecrypt(message);
|
|
|
|
onActionDecrypt(message);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -2101,6 +2110,11 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
}.execute(context, owner, args, "show:images");
|
|
|
|
}.execute(context, owner, args, "show:images");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void onActionUnsubscribe(TupleMessageEx message) {
|
|
|
|
|
|
|
|
Uri uri = Uri.parse(message.unsubscribe);
|
|
|
|
|
|
|
|
onOpenLink(uri, context.getString(R.string.title_legend_show_unsubscribe));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void onActionDecrypt(TupleMessageEx message) {
|
|
|
|
private void onActionDecrypt(TupleMessageEx message) {
|
|
|
|
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(context);
|
|
|
|
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(context);
|
|
|
|
lbm.sendBroadcast(
|
|
|
|
lbm.sendBroadcast(
|
|
|
|