Skip to content

Commit

Permalink
Fix empty file after rename
Browse files Browse the repository at this point in the history
Signed-off-by: alperozturk <[email protected]>
  • Loading branch information
alperozturk96 committed Oct 25, 2023
1 parent e936a6a commit 41523eb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}


Expand Down

0 comments on commit 41523eb

Please sign in to comment.