From 2ad7488b4b5d5e01f56ab64c8c8790b7779471e7 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Tue, 6 Mar 2018 18:03:08 +0100 Subject: [PATCH] Updated linphone + improved file transfer bubbles layout --- src/android/org/linphone/chat/ChatEventsAdapter.java | 6 ++++-- submodules/linphone | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/android/org/linphone/chat/ChatEventsAdapter.java b/src/android/org/linphone/chat/ChatEventsAdapter.java index a3679ba2b..0c96d1f22 100644 --- a/src/android/org/linphone/chat/ChatEventsAdapter.java +++ b/src/android/org/linphone/chat/ChatEventsAdapter.java @@ -97,6 +97,7 @@ public class ChatEventsAdapter extends ListSelectionAdapter { if (offset == total) { holder.fileTransferProgressBar.setVisibility(View.GONE); + holder.fileTransferAction.setVisibility(View.GONE); holder.fileTransferLayout.setVisibility(View.GONE); displayAttachedFile(message, holder); @@ -329,7 +330,7 @@ public class ChatEventsAdapter extends ListSelectionAdapter { holder.fileTransferLayout.setVisibility(View.VISIBLE); holder.fileTransferProgressBar.setVisibility(View.GONE); - if (message.getState() == ChatMessage.State.InProgress && message.getFileTransferFilepath() != null) { // Incoming file transfer in progress + if (message.isFileTransferInProgress()) { // Incoming file transfer in progress holder.fileTransferAction.setVisibility(View.GONE); } else { holder.fileTransferAction.setText(mContext.getString(R.string.accept)); @@ -349,6 +350,7 @@ public class ChatEventsAdapter extends ListSelectionAdapter { message.setListener(mListener); message.setFileTransferFilepath(file.getPath()); message.downloadFile(); + } else { Log.w("WRITE_EXTERNAL_STORAGE permission not granted, won't be able to store the downloaded file"); LinphoneActivity.instance().checkAndRequestExternalStoragePermission(); @@ -356,7 +358,7 @@ public class ChatEventsAdapter extends ListSelectionAdapter { } }); } - } else if (message.getState() == ChatMessage.State.InProgress && message.getFileTransferFilepath() != null) { // Outgoing file transfer in progress + } else if (message.isFileTransferInProgress()) { // Outgoing file transfer in progress message.setListener(mListener); // add the listener for file upload progress display holder.messageSendingInProgress.setVisibility(View.GONE); holder.fileTransferLayout.setVisibility(View.VISIBLE); diff --git a/submodules/linphone b/submodules/linphone index 9e4e48830..0684cedc2 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 9e4e48830be42c921072e781e3f5ecdb5cc4e07f +Subproject commit 0684cedc21487decf5b05b24133f4654b86c8024