X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/011700631331a63d2c9d756dc60649fd6b2492f4..4d7b5a1e502852ba66820812c557afc96218e715:/src/com/owncloud/android/ui/activity/FileActivity.java diff --git a/src/com/owncloud/android/ui/activity/FileActivity.java b/src/com/owncloud/android/ui/activity/FileActivity.java index 28f74e00..13bad2ed 100644 --- a/src/com/owncloud/android/ui/activity/FileActivity.java +++ b/src/com/owncloud/android/ui/activity/FileActivity.java @@ -393,13 +393,18 @@ public class FileActivity extends ActionBarActivity } protected void updateActionBarTitleAndHomeButton(){ - if (mFile.getParentId() == 0) { + if (mFile.getParentId() == 0 || + (!mFile.isFolder() && mFile.getParentId() == 1)) { getSupportActionBar().setTitle(getString( R.string.default_display_name_for_root_folder)); mDrawerToggle.setDrawerIndicatorEnabled(true); - } else { + } else if (mFile.isFolder()) { getSupportActionBar().setTitle(mFile.getFileName().toString()); mDrawerToggle.setDrawerIndicatorEnabled(false); + } else { + getSupportActionBar().setTitle(getStorageManager().getFileById(mFile.getParentId()) + .getFileName().toString()); + mDrawerToggle.setDrawerIndicatorEnabled(false); } } /** @@ -866,12 +871,14 @@ public class FileActivity extends ActionBarActivity Intent settingsIntent = new Intent(getApplicationContext(), Preferences.class); startActivity(settingsIntent); + mDrawerLayout.closeDrawers(); break; case 2: // Logs Intent loggerIntent = new Intent(getApplicationContext(), LogHistoryActivity.class); startActivity(loggerIntent); + mDrawerLayout.closeDrawers(); break; } }