use of com.owncloud.android.ui.fragment.FileFragment in project android by owncloud.
the class FileDisplayActivity method onRenameFileOperationFinish.
/**
* Updates the view associated to the activity after the finish of an operation trying to rename
* a file.
*
* @param operation Renaming operation performed.
* @param result Result of the renaming.
*/
private void onRenameFileOperationFinish(RenameFileOperation operation, RemoteOperationResult result) {
OCFile renamedFile = operation.getFile();
if (result.isSuccess()) {
FileFragment details = getSecondFragment();
if (details != null && renamedFile.equals(details.getFile())) {
renamedFile = getStorageManager().getFileById(renamedFile.getFileId());
setFile(renamedFile);
details.onFileMetadataChanged(renamedFile);
updateActionBarTitleAndHomeButton(renamedFile);
}
if (getStorageManager().getFileById(renamedFile.getParentId()).equals(getCurrentDir())) {
refreshListOfFilesFragment(true);
}
} else {
showSnackMessage(ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()));
if (result.isSslRecoverableException()) {
mLastSslUntrustedServerResult = result;
showUntrustedCertDialog(mLastSslUntrustedServerResult);
}
}
}
use of com.owncloud.android.ui.fragment.FileFragment in project android by owncloud.
the class PreviewImagePagerAdapter method updateWithDownloadError.
private void updateWithDownloadError(int position) {
FileFragment fragmentToUpdate = mCachedFragments.get(position);
if (fragmentToUpdate != null) {
mObsoleteFragments.add(fragmentToUpdate);
}
mDownloadErrors.add(position);
}
Aggregations