|
|
|
@ -6,6 +6,7 @@ import android.content.DialogInterface;
@@ -6,6 +6,7 @@ import android.content.DialogInterface;
|
|
|
|
|
import android.content.DialogInterface.OnClickListener; |
|
|
|
|
|
|
|
|
|
import org.transdroid.R; |
|
|
|
|
import org.transdroid.daemon.Daemon; |
|
|
|
|
import org.transdroid.daemon.Torrent; |
|
|
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
@ -13,7 +14,7 @@ import java.util.List;
@@ -13,7 +14,7 @@ import java.util.List;
|
|
|
|
|
public class ConfirmRemoveDialog { |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Opens a dialog that confirms the removal of a torrent, along with an option for with deleting downloaded files |
|
|
|
|
* Opens a dialog that confirms the removal of a torrent, along with an option for deleting downloaded files |
|
|
|
|
* @param activity The torrents activity from which the dialog is started (and which received the callback) |
|
|
|
|
* @param torrents List of torrents to be removed |
|
|
|
|
*/ |
|
|
|
@ -34,7 +35,9 @@ public class ConfirmRemoveDialog {
@@ -34,7 +35,9 @@ public class ConfirmRemoveDialog {
|
|
|
|
|
@Override |
|
|
|
|
public void onClick(DialogInterface dialog, int which) { |
|
|
|
|
for (Torrent torrent : torrents) { |
|
|
|
|
activity.removeTorrent(torrent, isRemoveDataChecked[0]); |
|
|
|
|
boolean shouldRemoveData = isRemoveDataChecked[0] && |
|
|
|
|
Daemon.supportsRemoveWithData(torrent.getDaemon()); |
|
|
|
|
activity.removeTorrent(torrent, shouldRemoveData); |
|
|
|
|
} |
|
|
|
|
dialog.dismiss(); |
|
|
|
|
} |
|
|
|
|