fix not recognizing message as download. fixes #4178
This commit is contained in:
parent
bd4d939a29
commit
90a0d36362
|
@ -28,6 +28,7 @@ import eu.siacs.conversations.persistance.DatabaseBackend;
|
|||
import eu.siacs.conversations.services.AvatarService;
|
||||
import eu.siacs.conversations.services.QuickConversationsService;
|
||||
import eu.siacs.conversations.utils.JidHelper;
|
||||
import eu.siacs.conversations.utils.MessageUtils;
|
||||
import eu.siacs.conversations.utils.UIHelper;
|
||||
import eu.siacs.conversations.xmpp.Jid;
|
||||
import eu.siacs.conversations.xmpp.chatstate.ChatState;
|
||||
|
@ -258,9 +259,11 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl
|
|||
public Message findMessageWithFileAndUuid(final String uuid) {
|
||||
synchronized (this.messages) {
|
||||
for (final Message message : this.messages) {
|
||||
final Transferable transferable = message.getTransferable();
|
||||
final boolean unInitiatedButKnownSize = MessageUtils.unInitiatedButKnownSize(message);
|
||||
if (message.getUuid().equals(uuid)
|
||||
&& message.getEncryption() != Message.ENCRYPTION_PGP
|
||||
&& (message.isFileOrImage() || message.treatAsDownloadable())) {
|
||||
&& (message.isFileOrImage() || message.treatAsDownloadable() || unInitiatedButKnownSize || (transferable != null && transferable.getStatus() != Transferable.STATUS_UPLOADING))) {
|
||||
return message;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -131,7 +131,6 @@ public class HttpDownloadConnection implements Transferable {
|
|||
}
|
||||
|
||||
private void download(final boolean interactive) {
|
||||
Log.d(Config.LOGTAG,"download()",new Exception());
|
||||
EXECUTOR.execute(new FileDownloader(interactive));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue