fix copy url to clipboard action for undownloaded files

This commit is contained in:
Daniel Gultsch 2021-01-28 17:49:34 +01:00
parent 10382e83bf
commit 4a9dfb9567

View file

@ -96,7 +96,8 @@ public class ShareUtil {
resId = R.string.file_url;
url = message.getFileParams().url.toString();
} else {
url = message.getBody().trim();
final Message.FileParams fileParams = message.getFileParams();
url = (fileParams != null && fileParams.url != null) ? fileParams.url.toString() : message.getBody().trim();
resId = R.string.file_url;
}
if (activity.copyTextToClipboard(url, resId)) {