aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-07-26 20:43:05 +0200
committerDaniel Gultsch <daniel@gultsch.de>2016-07-26 20:43:05 +0200
commit82908fb54b3d683acb9ab5ae10efbc5ce203d2f1 (patch)
treeb26634773d780399d8e9c4677fec1d1f5e77b281 /src/main/java/eu
parent3409399ef1c4feb6370d830f6679fedc8f6256ec (diff)
added more logging for file deletion
Diffstat (limited to 'src/main/java/eu')
-rw-r--r--src/main/java/eu/siacs/conversations/services/XmppConnectionService.java17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
index b6d073db..fd620de2 100644
--- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
@@ -1287,18 +1287,23 @@ public class XmppConnectionService extends Service {
}
private void markFileDeleted(final String path) {
+ Log.d(Config.LOGTAG,"deleted file "+path);
for (Conversation conversation : getConversations()) {
conversation.findMessagesWithFiles(new Conversation.OnMessageFound() {
@Override
public void onMessageFound(Message message) {
DownloadableFile file = fileBackend.getFile(message);
- if (file.getAbsolutePath().equals(path) && !file.exists()) {
- message.setTransferable(new TransferablePlaceholder(Transferable.STATUS_DELETED));
- final int s = message.getStatus();
- if (s == Message.STATUS_WAITING || s == Message.STATUS_OFFERED || s == Message.STATUS_UNSEND) {
- markMessage(message, Message.STATUS_SEND_FAILED);
+ if (file.getAbsolutePath().equals(path)) {
+ if (file.exists()) {
+ message.setTransferable(new TransferablePlaceholder(Transferable.STATUS_DELETED));
+ final int s = message.getStatus();
+ if (s == Message.STATUS_WAITING || s == Message.STATUS_OFFERED || s == Message.STATUS_UNSEND) {
+ markMessage(message, Message.STATUS_SEND_FAILED);
+ } else {
+ updateConversationUi();
+ }
} else {
- updateConversationUi();
+ Log.d(Config.LOGTAG,"found matching message for file "+path+" but file still exists");
}
}
}