diff --git a/app/src/main/java/com/owncloud/android/ui/activity/FileActivity.java b/app/src/main/java/com/owncloud/android/ui/activity/FileActivity.java index 87ca463056c2..7a1b96cf4a52 100644 --- a/app/src/main/java/com/owncloud/android/ui/activity/FileActivity.java +++ b/app/src/main/java/com/owncloud/android/ui/activity/FileActivity.java @@ -779,6 +779,13 @@ private void onUpdateShareInformation(RemoteOperationResult result, @StringRes i } } + public void refreshList() { + final Fragment fileListFragment = getSupportFragmentManager().findFragmentByTag(FileDisplayActivity.TAG_LIST_OF_FILES); + if (fileListFragment != null) { + ((OCFileListFragment) fileListFragment).onRefresh(); + } + } + private void onCreateShareViaLinkOperationFinish(CreateShareViaLinkOperation operation, RemoteOperationResult result) { FileDetailSharingFragment sharingFragment = getShareFileFragment(); diff --git a/app/src/main/java/com/owncloud/android/ui/helpers/FileOperationsHelper.java b/app/src/main/java/com/owncloud/android/ui/helpers/FileOperationsHelper.java index 4fa13c39fdc5..0e66daa7a429 100755 --- a/app/src/main/java/com/owncloud/android/ui/helpers/FileOperationsHelper.java +++ b/app/src/main/java/com/owncloud/android/ui/helpers/FileOperationsHelper.java @@ -932,15 +932,15 @@ public void toggleFileLock(OCFile file, boolean shouldBeLocked) { } public void renameFile(OCFile file, String newFilename) { - // RenameFile Intent service = new Intent(fileActivity, OperationsService.class); + service.setAction(OperationsService.ACTION_RENAME); service.putExtra(OperationsService.EXTRA_ACCOUNT, fileActivity.getAccount()); service.putExtra(OperationsService.EXTRA_REMOTE_PATH, file.getRemotePath()); service.putExtra(OperationsService.EXTRA_NEWNAME, newFilename); mWaitingForOpId = fileActivity.getOperationsServiceBinder().queueNewOperation(service); - fileActivity.showLoadingDialog(fileActivity.getString(R.string.wait_a_moment)); + fileActivity.refreshList(); }