Skip to content

Commit

Permalink
Fixed transfer destinations not being set
Browse files Browse the repository at this point in the history
  • Loading branch information
DSteve595 committed Jan 5, 2015
1 parent 6423e52 commit 9bfdee0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ android {
defaultConfig {
minSdkVersion 14
targetSdkVersion 21
versionCode 79
versionName '3.0.4'
versionCode 80
versionName '3.0.5'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

import java.io.FileNotFoundException;

public class AddTransfers extends FragmentActivity implements DestinationFilesDialog.Callbacks {
public class AddTransfers extends FragmentActivity {
public static final int TYPE_SELECTING = -1;
public static final int TYPE_URL = 1;
public static final int TYPE_FILE = 2;
Expand Down Expand Up @@ -94,6 +94,18 @@ public void onClick(View v) {
public void onClick(View v) {
DestinationFilesDialog destinationDialog = (DestinationFilesDialog)
DestinationFilesDialog.instantiate(AddTransfers.this, DestinationFilesDialog.class.getName());
destinationDialog.setCallbacks(new DestinationFilesDialog.Callbacks() {
@Override
public void onDestinationFolderSelected(PutioFile folder) {
destinationFolderId = folder.id;
buttonDestination.setText(folder.name);

sharedPrefs.edit()
.putLong("destinationFolderId", folder.id)
.putString("destinationFolderName", folder.name)
.apply();
}
});
destinationDialog.show(getSupportFragmentManager(), "dialog");
}
});
Expand Down Expand Up @@ -248,17 +260,6 @@ private void addFile() {
}
}

@Override
public void onDestinationFolderSelected(PutioFile folder) {
destinationFolderId = folder.id;
buttonDestination.setText(folder.name);

sharedPrefs.edit()
.putLong("destinationFolderId", folder.id)
.putString("destinationFolderName", folder.name)
.apply();
}

@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
switch (requestCode) {
Expand Down

0 comments on commit 9bfdee0

Please sign in to comment.