aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/ui/ConversationFragment.java
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2018-02-16 21:04:29 +0100
committersteckbrief <steckbrief@chefmail.de>2018-02-16 21:04:29 +0100
commit62bc6885db07423a434f945de9def863cb12b8c1 (patch)
tree0d60daca06a78d11546c02083c29f826581ae179 /src/main/java/de/thedevstack/conversationsplus/ui/ConversationFragment.java
parent84a2f8e41ac4d5a7ebc24f4eb5b99e9bc3029f1f (diff)
introduces cancel status for file transfers, fixes NPE in file sharing after picture resize
Diffstat (limited to '')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/ui/ConversationFragment.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/ui/ConversationFragment.java b/src/main/java/de/thedevstack/conversationsplus/ui/ConversationFragment.java
index d25fa461..528e2a55 100644
--- a/src/main/java/de/thedevstack/conversationsplus/ui/ConversationFragment.java
+++ b/src/main/java/de/thedevstack/conversationsplus/ui/ConversationFragment.java
@@ -553,7 +553,8 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
if (treatAsFile || (GeoHelper.isGeoUri(m.getBody()))) {
shareWith.setVisible(true);
}
- if (m.getStatus() == Message.STATUS_SEND_FAILED) {
+ if (m.getStatus() == Message.STATUS_SEND_FAILED
+ || Message.STATUS_SEND_CANCELED == m.getStatus()) {
sendAgain.setVisible(true);
}
if (m.hasFileOnRemoteHost()
@@ -700,7 +701,7 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
if (transferable != null) {
transferable.cancel();
} else {
- MessageUtil.markMessage(message, Message.STATUS_SEND_FAILED);
+ MessageUtil.markMessage(message, Message.STATUS_SEND_CANCELED);
}
}