From df394c71be42d9d122de869088f3de377a1d985a Mon Sep 17 00:00:00 2001 From: masensio Date: Tue, 1 Oct 2013 13:43:52 +0200 Subject: [PATCH] OC-1507- Reopened. Browse up < --- .../ui/activity/FileDisplayActivity.java | 42 +++++++------------ 1 file changed, 14 insertions(+), 28 deletions(-) diff --git a/src/com/owncloud/android/ui/activity/FileDisplayActivity.java b/src/com/owncloud/android/ui/activity/FileDisplayActivity.java index d0357460b1..bacc6a929d 100644 --- a/src/com/owncloud/android/ui/activity/FileDisplayActivity.java +++ b/src/com/owncloud/android/ui/activity/FileDisplayActivity.java @@ -594,23 +594,22 @@ OCFileListFragment.ContainerActivity, FileDetailFragment.ContainerActivity, OnNa @Override public void onBackPressed() { - if (!mSyncInProgress) { - OCFileListFragment listOfFiles = getListOfFilesFragment(); - if (mDualPane || getSecondFragment() == null) { - if (listOfFiles != null) { // should never be null, indeed - if (mDirectories.getCount() <= 1) { - finish(); - return; - } - popDirname(); - listOfFiles.onBrowseUp(); - } - } + OCFileListFragment listOfFiles = getListOfFilesFragment(); + if (mDualPane || getSecondFragment() == null) { if (listOfFiles != null) { // should never be null, indeed - setFile(listOfFiles.getCurrentFile()); + if (mDirectories.getCount() <= 1) { + finish(); + return; + } + popDirname(); + listOfFiles.onBrowseUp(); } - cleanSecondFragment(); } + if (listOfFiles != null) { // should never be null, indeed + setFile(listOfFiles.getCurrentFile()); + } + cleanSecondFragment(); + } @Override @@ -651,19 +650,6 @@ OCFileListFragment.ContainerActivity, FileDetailFragment.ContainerActivity, OnNa } - @Override - protected void onStart() { - super.onStart(); - Log_OC.e(TAG, "onStart() start"); - - // Update the sync operation - if (mSyncInProgress){ - } - - Log_OC.e(TAG, "onStart() end"); - } - - @Override protected void onPause() { super.onPause(); @@ -1073,7 +1059,7 @@ OCFileListFragment.ContainerActivity, FileDetailFragment.ContainerActivity, OnNa if (chosenFile == null || mDualPane) { // only list of files - set for browsing through folders OCFile currentDir = getCurrentDir(); - actionBar.setDisplayHomeAsUpEnabled(currentDir != null && currentDir.getParentId() != 0 && !mSyncInProgress); + actionBar.setDisplayHomeAsUpEnabled(currentDir != null && currentDir.getParentId() != 0); actionBar.setDisplayShowTitleEnabled(false); actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST); actionBar.setListNavigationCallbacks(mDirectories, this); // assuming mDirectories is updated