From 6b3eb3e8970e86da09229b191d5df20cfde4eca4 Mon Sep 17 00:00:00 2001 From: alperozturk Date: Thu, 7 Dec 2023 14:30:06 +0100 Subject: [PATCH] Simplify code Signed-off-by: alperozturk --- .../owncloud/android/ui/activity/UploadListActivity.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 10cdff44fd..a51d29580e 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 @@ -62,7 +62,6 @@ import com.owncloud.android.ui.dialog.TwoActionDialogFragment; import com.owncloud.android.utils.FilesSyncHelper; import com.owncloud.android.utils.theme.ViewThemeUtils; -import java.util.ArrayList; import java.util.Collections; import javax.inject.Inject; @@ -173,21 +172,22 @@ public class UploadListActivity extends FileActivity { R.string.uploader_handle_not_existed_file_dialog_negative_button_text, R.string.uploader_handle_not_existed_file_dialog_positive_button_text, new TwoActionDialogFragment.TwoActionDialogActionListener() { + final OCUpload upload = uploadListAdapter.selectedOCUpload; + @Override public void positiveAction() { - OCUpload upload = uploadListAdapter.selectedOCUpload; upload.setLastResult(null); FileUploader.retryUpload(MainApp.getAppContext(), userAccountManager.getUser(), upload); } @Override public void negativeAction() { - OCUpload upload = uploadListAdapter.selectedOCUpload; OCFile fileOnlyExistOnLocalStorage = getStorageManager().getFileByEncryptedRemotePath(upload.getRemotePath()); getFileOperationsHelper().removeFiles(Collections.singletonList(fileOnlyExistOnLocalStorage), false, false); uploadListAdapter.removeUpload(upload); } }); + dialog.show(this.getSupportFragmentManager(), null); }