diff --git a/app/src/main/java/com/owncloud/android/ui/activity/UploadListActivity.java b/app/src/main/java/com/owncloud/android/ui/activity/UploadListActivity.java index 8b84a8838a..43d6a7e960 100755 --- a/app/src/main/java/com/owncloud/android/ui/activity/UploadListActivity.java +++ b/app/src/main/java/com/owncloud/android/ui/activity/UploadListActivity.java @@ -70,7 +70,7 @@ import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; * Activity listing pending, active, and completed uploads. User can delete completed uploads from view. Content of this * list of coming from {@link UploadsStorageManager}. */ -public class UploadListActivity extends FileActivity implements TwoActionDialogFragment.TwoActionDialogActionListener { +public class UploadListActivity extends FileActivity { private static final String TAG = UploadListActivity.class.getSimpleName(); public static final String HANDLE_FILE_EXISTENCE_RECEIVER = "HANDLE_FILE_EXISTENCE_RECEIVER"; @@ -161,24 +161,27 @@ public class UploadListActivity extends FileActivity implements TwoActionDialogF }; private void showHandleFileExistenceDialog() { - TwoActionDialogFragment dialog = TwoActionDialogFragment.Companion.newInstance(R.string.uploader_handle_not_existed_file_dialog_title, - R.string.uploader_handle_not_existed_file_dialog_message, - R.string.common_cancel, - R.string.common_ok, - this); + TwoActionDialogFragment dialog = TwoActionDialogFragment + .Companion + .newInstance(R.string.uploader_handle_not_existed_file_dialog_title, + R.string.uploader_handle_not_existed_file_dialog_message, + R.string.uploader_handle_not_existed_file_dialog_negative_button_text, + R.string.common_ok, + new TwoActionDialogFragment.TwoActionDialogActionListener() { + @Override + public void positiveAction() { + + } + + @Override + public void negativeAction() { + OCFile fileOnlyExistOnLocalStorage = uploadListAdapter.getSelectedOCFile(); + uploadListAdapter.removeUpload(uploadListAdapter.selectedOCUpload); + } + }); dialog.show(this.getSupportFragmentManager(), null); } - @Override - public void positiveAction() { - - } - - @Override - public void negativeAction() { - - } - @Override protected void onDestroy() { LocalBroadcastManager.getInstance(this).unregisterReceiver(handleFileExistenceReceiver); @@ -240,8 +243,7 @@ public class UploadListActivity extends FileActivity implements TwoActionDialogF uploadsStorageManager, connectivityService, userAccountManager, - powerManagementService - )).start(); + powerManagementService)).start(); // update UI uploadListAdapter.loadUploadItemsFromDb(); diff --git a/app/src/main/java/com/owncloud/android/ui/adapter/UploadListAdapter.java b/app/src/main/java/com/owncloud/android/ui/adapter/UploadListAdapter.java index 1d330c517b..33215bf745 100755 --- a/app/src/main/java/com/owncloud/android/ui/adapter/UploadListAdapter.java +++ b/app/src/main/java/com/owncloud/android/ui/adapter/UploadListAdapter.java @@ -502,6 +502,7 @@ public class UploadListAdapter extends SectionedRecyclerViewAdapter { @@ -570,7 +574,13 @@ public class UploadListAdapter extends SectionedRecyclerViewAdapterAdd folder info creates folder info File Not Found + Delete Local File This file does not longer exist in server still want to upload? We couldnt locate the file on server. Another user may have deleted the file File not found. Are you sure this file exist or conflict not solved before?