aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/ui
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2016-08-23 12:00:50 +0200
committersteckbrief <steckbrief@chefmail.de>2016-08-23 12:00:50 +0200
commitc6ed89e4109a3db25d9cae8ad1426a3294e721c3 (patch)
treec8e7facf0ecfca6aff8d544f3d7a1e4d40731c93 /src/main/java/de/thedevstack/conversationsplus/ui
parent14e28d1e9afc058526eba4a6096d582f4810ea84 (diff)
Javadoc added and access to xmppConnectionService moved
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/ui')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/ui/listeners/DeleteFileCallback.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/ui/listeners/DeleteFileCallback.java b/src/main/java/de/thedevstack/conversationsplus/ui/listeners/DeleteFileCallback.java
index 3ff7f367..f855a90d 100644
--- a/src/main/java/de/thedevstack/conversationsplus/ui/listeners/DeleteFileCallback.java
+++ b/src/main/java/de/thedevstack/conversationsplus/ui/listeners/DeleteFileCallback.java
@@ -5,10 +5,9 @@ import de.thedevstack.conversationsplus.entities.Transferable;
import de.thedevstack.conversationsplus.entities.TransferablePlaceholder;
import de.thedevstack.conversationsplus.persistance.FileBackend;
import de.thedevstack.conversationsplus.utils.UiUpdateHelper;
-import de.thedevstack.conversationsplus.utils.XmppConnectionServiceAccessor;
/**
- * Created by steckbrief on 23.08.2016.
+ * Callback for the user decision if a file should be deleted or not.
*/
public class DeleteFileCallback implements SimpleUserDecisionCallback {
private final Message message;
@@ -17,18 +16,27 @@ public class DeleteFileCallback implements SimpleUserDecisionCallback {
this.message = message;
}
+ /**
+ * Deletes the file and updates the UI.
+ */
private void deleteFile() {
- if (FileBackend.deleteFile(this.message, XmppConnectionServiceAccessor.xmppConnectionService)) {
+ if (FileBackend.deleteFile(this.message)) {
this.message.setTransferable(new TransferablePlaceholder(Transferable.STATUS_DELETED));
UiUpdateHelper.updateConversationUi();
}
}
+ /**
+ * Deletes the file.
+ */
@Override
public void onYes() {
this.deleteFile();
}
+ /**
+ * Nothing to do in this case.
+ */
@Override
public void onNo() {
// Nothing to do