mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-24 23:28:10 +00:00
Display images without using the appData
This commit is contained in:
parent
fa309a63c6
commit
b715605602
1 changed files with 5 additions and 4 deletions
|
|
@ -337,7 +337,7 @@ public class ChatEventsAdapter extends ListSelectionAdapter {
|
|||
String externalBodyUrl = message.getExternalBodyUrl();
|
||||
Content fileTransferContent = message.getFileTransferInformation();
|
||||
|
||||
if (message.getAppdata() != null) { // Something to display
|
||||
if (fileTransferContent != null && fileTransferContent.isFile()) { // Something to display
|
||||
displayAttachedFile(message, holder);
|
||||
}
|
||||
|
||||
|
|
@ -506,9 +506,10 @@ public class ChatEventsAdapter extends ListSelectionAdapter {
|
|||
private void displayAttachedFile(ChatMessage message, ChatBubbleViewHolder holder) {
|
||||
holder.fileName.setVisibility(View.VISIBLE);
|
||||
|
||||
String appData = message.getAppdata();
|
||||
if (appData != null) {
|
||||
holder.fileName.setText(LinphoneUtils.getNameFromFilePath(appData));
|
||||
Content fileContent = message.getFileTransferInformation();
|
||||
String appData = fileContent.getFilePath();
|
||||
if (fileContent != null && fileContent.isFile() && appData != null) {
|
||||
holder.fileName.setText(fileContent.getName());
|
||||
if (LinphoneUtils.isExtensionImage(appData)) {
|
||||
holder.messageImage.setVisibility(View.VISIBLE);
|
||||
loadBitmap(appData, holder.messageImage);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue