Skip to content

Commit

Permalink
Fix settings import/export to use document provider and adding torren…
Browse files Browse the repository at this point in the history
…ts from file
  • Loading branch information
erickok committed Jan 24, 2024
1 parent 25ba61e commit 77d785c
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions app/src/main/java/org/transdroid/core/gui/TorrentsActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,6 @@ public class TorrentsActivity extends AppCompatActivity implements TorrentTasksE
// Auto refresh task
private AsyncTask<Void, Void, Void> autoRefreshTask;

private String awaitingAddLocalFile;
private String awaitingAddTitle;
/**
* Handles item selections on the dedicated list of filter items
*/
Expand Down Expand Up @@ -750,14 +748,6 @@ public boolean onSearchRequested() {
return true;
}

@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
if (awaitingAddLocalFile != null && awaitingAddTitle != null &&
Boolean.TRUE.equals(navigationHelper.handleTorrentReadPermissionResult(requestCode, grantResults))) {
addTorrentByFile(awaitingAddLocalFile, awaitingAddTitle);
}
}

@Click(R.id.addmenu_link_button)
protected void startUrlEntryDialog() {
addmenuButton.collapse();
Expand Down Expand Up @@ -1025,13 +1015,6 @@ public void addTorrentByMagnetUrl(String url, String title) {

@Background
protected void addTorrentByFile(String localFile, String title) {
// TODO EKO
// if (!navigationHelper.checkTorrentReadPermission(this)) {
// // No read permission yet (which we get the result of in onRequestPermissionsResult)
// awaitingAddLocalFile = localFile;
// awaitingAddTitle = title;
// return;
// }
DaemonTaskResult result = AddByFileTask.create(currentConnection, localFile).execute(log);
if (result instanceof DaemonTaskSuccessResult) {
onTaskSucceeded((DaemonTaskSuccessResult) result, getString(R.string.result_added, title));
Expand Down

0 comments on commit 77d785c

Please sign in to comment.