mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 17:46:37 +03:00
changes due to codacy
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
parent
25075069c9
commit
5b9c442139
2 changed files with 5 additions and 9 deletions
|
@ -1729,7 +1729,7 @@ public class FileDisplayActivity extends HookActivity
|
|||
} else if (operation instanceof UnshareOperation) {
|
||||
onUpdateShareInformation(result, R.string.unsharing_failed);
|
||||
} else if (operation instanceof RestoreFileVersionOperation) {
|
||||
onRestoreFileVersionOperationFinish((RestoreFileVersionOperation) operation, result);
|
||||
onRestoreFileVersionOperationFinish(result);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1793,9 +1793,7 @@ public class FileDisplayActivity extends HookActivity
|
|||
}
|
||||
}
|
||||
|
||||
private void onRestoreFileVersionOperationFinish(RestoreFileVersionOperation operation,
|
||||
RemoteOperationResult result) {
|
||||
|
||||
private void onRestoreFileVersionOperationFinish(RemoteOperationResult result) {
|
||||
if (result.isSuccess()) {
|
||||
OCFile file = getFile();
|
||||
|
||||
|
@ -1816,7 +1814,6 @@ public class FileDisplayActivity extends HookActivity
|
|||
Snackbar.make(getSecondFragment().getView(), R.string.file_version_restored_error,
|
||||
Snackbar.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void setMediaServiceConnection() {
|
||||
|
|
|
@ -122,7 +122,6 @@ public class FileDetailActivitiesFragment extends Fragment implements ActivityLi
|
|||
private boolean restoreFileVersionSupported;
|
||||
private String userId;
|
||||
private FileOperationsHelper operationsHelper;
|
||||
private FileDataStorageManager storageManager;
|
||||
|
||||
public static FileDetailActivitiesFragment newInstance(OCFile file, Account account) {
|
||||
FileDetailActivitiesFragment fragment = new FileDetailActivitiesFragment();
|
||||
|
@ -191,7 +190,7 @@ public class FileDetailActivitiesFragment extends Fragment implements ActivityLi
|
|||
}
|
||||
|
||||
private void setupView() {
|
||||
storageManager = new FileDataStorageManager(account, getActivity().getContentResolver());
|
||||
FileDataStorageManager storageManager = new FileDataStorageManager(account, getActivity().getContentResolver());
|
||||
operationsHelper = ((ComponentsGetter) getActivity()).getFileOperationsHelper();
|
||||
|
||||
OCCapability capability = storageManager.getCapability(account.name);
|
||||
|
@ -266,8 +265,8 @@ public class FileDetailActivitiesFragment extends Fragment implements ActivityLi
|
|||
|
||||
ArrayList<Object> versions = null;
|
||||
if (restoreFileVersionSupported) {
|
||||
ReadFileVersionsOperation readFileVersionsOperation = new ReadFileVersionsOperation(file.getLocalId(),
|
||||
userId);
|
||||
ReadFileVersionsOperation readFileVersionsOperation = new ReadFileVersionsOperation(
|
||||
file.getLocalId(), userId);
|
||||
|
||||
RemoteOperationResult result1 = readFileVersionsOperation.execute(ownCloudClient);
|
||||
|
||||
|
|
Loading…
Reference in a new issue