aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/entities
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/entities
parent84a2f8e41ac4d5a7ebc24f4eb5b99e9bc3029f1f (diff)
introduces cancel status for file transfers, fixes NPE in file sharing after picture resize
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/entities')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/entities/Message.java1
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/entities/Transferable.java2
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/entities/TransferablePlaceholder.java5
3 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/entities/Message.java b/src/main/java/de/thedevstack/conversationsplus/entities/Message.java
index b8ebfe2b..36ab036e 100644
--- a/src/main/java/de/thedevstack/conversationsplus/entities/Message.java
+++ b/src/main/java/de/thedevstack/conversationsplus/entities/Message.java
@@ -27,6 +27,7 @@ public class Message extends AbstractEntity implements LoadAvatarFor {
public static final int STATUS_OFFERED = 6;
public static final int STATUS_SEND_RECEIVED = 7;
public static final int STATUS_SEND_DISPLAYED = 8;
+ public static final int STATUS_SEND_CANCELED = 9; // FIXME This bullshit is needed until status is handled more properly
public static final int ENCRYPTION_NONE = 0;
public static final int ENCRYPTION_PGP = 1;
diff --git a/src/main/java/de/thedevstack/conversationsplus/entities/Transferable.java b/src/main/java/de/thedevstack/conversationsplus/entities/Transferable.java
index 10bc8bcf..95472548 100644
--- a/src/main/java/de/thedevstack/conversationsplus/entities/Transferable.java
+++ b/src/main/java/de/thedevstack/conversationsplus/entities/Transferable.java
@@ -28,4 +28,6 @@ public interface Transferable {
int getProgress();
void cancel();
+
+ boolean isCanceled();
}
diff --git a/src/main/java/de/thedevstack/conversationsplus/entities/TransferablePlaceholder.java b/src/main/java/de/thedevstack/conversationsplus/entities/TransferablePlaceholder.java
index 40292e1f..56d8564e 100644
--- a/src/main/java/de/thedevstack/conversationsplus/entities/TransferablePlaceholder.java
+++ b/src/main/java/de/thedevstack/conversationsplus/entities/TransferablePlaceholder.java
@@ -26,4 +26,9 @@ public class TransferablePlaceholder implements Transferable {
public void cancel() {
}
+
+ @Override
+ public boolean isCanceled() {
+ return false;
+ }
}