fixed download button on pgp images
This commit is contained in:
parent
f4330b3a48
commit
0d8bf660db
|
@ -273,9 +273,7 @@ public class ConversationFragment extends Fragment {
|
||||||
|
|
||||||
String filesize = "";
|
String filesize = "";
|
||||||
|
|
||||||
if ((item.getType() == Message.TYPE_IMAGE)
|
if (item.getType() == Message.TYPE_IMAGE) {
|
||||||
&& ((item.getEncryption() == Message.ENCRYPTION_DECRYPTED) || (item
|
|
||||||
.getEncryption() == Message.ENCRYPTION_NONE))) {
|
|
||||||
String[] fileParams = item.getBody().split(",");
|
String[] fileParams = item.getBody().split(",");
|
||||||
if ((fileParams.length >= 1)
|
if ((fileParams.length >= 1)
|
||||||
&& (item.getStatus() != Message.STATUS_PREPARING)) {
|
&& (item.getStatus() != Message.STATUS_PREPARING)) {
|
||||||
|
@ -316,7 +314,8 @@ public class ConversationFragment extends Fragment {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else if ((item.getEncryption() == Message.ENCRYPTION_DECRYPTED)
|
||||||
|
|| (item.getEncryption() == Message.ENCRYPTION_NONE)) {
|
||||||
viewHolder.messageBody.setVisibility(View.GONE);
|
viewHolder.messageBody.setVisibility(View.GONE);
|
||||||
viewHolder.image.setVisibility(View.VISIBLE);
|
viewHolder.image.setVisibility(View.VISIBLE);
|
||||||
if (fileParams.length == 3) {
|
if (fileParams.length == 3) {
|
||||||
|
@ -357,6 +356,22 @@ public class ConversationFragment extends Fragment {
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else if (item.getEncryption() == Message.ENCRYPTION_PGP) {
|
||||||
|
viewHolder.image.setVisibility(View.GONE);
|
||||||
|
viewHolder.messageBody.setVisibility(View.VISIBLE);
|
||||||
|
viewHolder.messageBody
|
||||||
|
.setText(getString(R.string.encrypted_message));
|
||||||
|
viewHolder.messageBody.setTextColor(0xff33B5E5);
|
||||||
|
viewHolder.messageBody.setTypeface(null,
|
||||||
|
Typeface.ITALIC);
|
||||||
|
} else {
|
||||||
|
viewHolder.image.setVisibility(View.GONE);
|
||||||
|
viewHolder.messageBody.setVisibility(View.VISIBLE);
|
||||||
|
viewHolder.messageBody
|
||||||
|
.setText(getString(R.string.decryption_failed));
|
||||||
|
viewHolder.messageBody.setTextColor(0xFFe92727);
|
||||||
|
viewHolder.messageBody.setTypeface(null,
|
||||||
|
Typeface.NORMAL);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
viewHolder.image.setVisibility(View.GONE);
|
viewHolder.image.setVisibility(View.GONE);
|
||||||
|
|
Loading…
Reference in New Issue