From: masensio Date: Wed, 14 May 2014 07:33:24 +0000 (+0200) Subject: Fix: app says thas has to stop when removing a image from the gallery X-Git-Tag: oc-android-1.7.0_signed~309^2~27 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/01c776bfb4a21b6d633808d200baac776190ceb5 Fix: app says thas has to stop when removing a image from the gallery --- diff --git a/src/com/owncloud/android/ui/preview/PreviewImageFragment.java b/src/com/owncloud/android/ui/preview/PreviewImageFragment.java index 6a2ab955..fd22b3a9 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, @@ -44,7 +44,6 @@ import com.actionbarsherlock.view.MenuItem; 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; @@ -158,20 +157,8 @@ public class PreviewImageFragment extends 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; }