From: Lennart Rosam Date: Fri, 25 May 2012 04:09:21 +0000 (+0200) Subject: Fixed: Rotating screen after viewing a file would return you to the X-Git-Tag: oc-android-1.4.3~384 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/5f61cb15552eb2fda01716078a9191b88cebf764?ds=inline Fixed: Rotating screen after viewing a file would return you to the folder where you last viewed a file --- diff --git a/src/eu/alefzero/owncloud/ui/activity/FileDisplayActivity.java b/src/eu/alefzero/owncloud/ui/activity/FileDisplayActivity.java index 3310ff46..47dae5fa 100644 --- a/src/eu/alefzero/owncloud/ui/activity/FileDisplayActivity.java +++ b/src/eu/alefzero/owncloud/ui/activity/FileDisplayActivity.java @@ -214,6 +214,7 @@ public class FileDisplayActivity extends SherlockFragmentActivity implements } popDirname(); mFileList.onNavigateUp(); + mCurrentDir = mFileList.getCurrentFile(); } @Override @@ -274,6 +275,9 @@ public class FileDisplayActivity extends SherlockFragmentActivity implements if(!mCurrentDir.isDirectory()){ mCurrentDir = mStorageManager.getFileById(mCurrentDir.getParentId()); } + + // Clear intent extra, so rotating the screen will not return us to this directory + getIntent().removeExtra(FileDetailFragment.EXTRA_FILE); } // Drop-Down navigation and file list restore