/* ownCloud Android client application
- * Copyright (C) 2012-2013 ownCloud Inc.
+ * Copyright (C) 2012-2014 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
import com.owncloud.android.R;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.files.FileMenuFilter;
-import com.owncloud.android.ui.activity.FileActivity;
import com.owncloud.android.ui.dialog.ConfirmationDialogFragment;
import com.owncloud.android.ui.dialog.RemoveFileDialogFragment;
import com.owncloud.android.ui.fragment.FileFragment;
if (savedInstanceState != null) {
if (!mIgnoreFirstSavedState) {
OCFile file = (OCFile)savedInstanceState.getParcelable(PreviewImageFragment.EXTRA_FILE);
+ setFile(file);
mAccount = savedInstanceState.getParcelable(PreviewImageFragment.EXTRA_ACCOUNT);
-
- // Update the file
- if (mAccount!= null) {
- OCFile updatedFile = ((FileActivity) getSherlockActivity()).
- getStorageManager().getFileByPath(file.getRemotePath());
- if (updatedFile != null) {
- setFile(updatedFile);
- } else {
- setFile(file);
- }
- } else {
- setFile(file);
- }
} else {
mIgnoreFirstSavedState = false;
}