From: masensio Date: Mon, 5 May 2014 12:10:15 +0000 (+0200) Subject: Additional changes to apply the new code to the other FileFragments: PreviewMediaFrag... X-Git-Tag: oc-android-1.7.0_signed~309^2~57^2 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/6cdd830a7be28b77688efc3cd62857c1e71a1342?ds=inline;hp=--cc Additional changes to apply the new code to the other FileFragments: PreviewMediaFragment, DetailsFragment, PreviewImageFragment --- 6cdd830a7be28b77688efc3cd62857c1e71a1342 diff --git a/src/com/owncloud/android/ui/fragment/FileDetailFragment.java b/src/com/owncloud/android/ui/fragment/FileDetailFragment.java index 33fef5e0..7995797d 100644 --- a/src/com/owncloud/android/ui/fragment/FileDetailFragment.java +++ b/src/com/owncloud/android/ui/fragment/FileDetailFragment.java @@ -1,6 +1,6 @@ /* ownCloud Android client application * Copyright (C) 2011 Bartek Przybylski - * 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, @@ -182,13 +182,14 @@ public class FileDetailFragment extends FileFragment implements @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); - if (mAccount != null) { - OCFile file = ((FileActivity)getActivity()).getStorageManager(). - getFileByPath(getFile().getRemotePath()); - if (file != null) { - setFile(file); - } - } + // TODO: Remove this code. (Updated no needed) +// if (mAccount != null) { +// OCFile file = ((FileActivity)getActivity()).getStorageManager(). +// getFileByPath(getFile().getRemotePath()); +// if (file != null) { +// setFile(file); +// } +// } } diff --git a/src/com/owncloud/android/ui/preview/PreviewImageFragment.java b/src/com/owncloud/android/ui/preview/PreviewImageFragment.java index 70ffa792..90c5c192 100644 --- a/src/com/owncloud/android/ui/preview/PreviewImageFragment.java +++ b/src/com/owncloud/android/ui/preview/PreviewImageFragment.java @@ -1,5 +1,5 @@ /* 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, @@ -173,20 +173,21 @@ public class PreviewImageFragment extends FileFragment implements OnRemoteOper 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); - } +// TODO remove this code: update file no needed +// // 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;