mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 17:46:37 +03:00
Fix, title is not correct when menu is shown and rotate
This commit is contained in:
parent
b6d7cd73c7
commit
65ff5a374a
1 changed files with 10 additions and 3 deletions
|
@ -373,7 +373,7 @@ public class FileActivity extends ActionBarActivity
|
|||
/** Called when a drawer has settled in a completely closed state. */
|
||||
public void onDrawerClosed(View view) {
|
||||
super.onDrawerClosed(view);
|
||||
updateActionBarTitleAndHomeButton(null);
|
||||
updateActionBarTitleAndHomeButton(mFile);
|
||||
invalidateOptionsMenu();
|
||||
}
|
||||
|
||||
|
@ -406,9 +406,16 @@ public class FileActivity extends ActionBarActivity
|
|||
/// choose the appropiate title
|
||||
if (chosenFile == null) {
|
||||
// mFile determines the title
|
||||
inRoot = (mFile == null || mFile.getParentId() == 0);
|
||||
OCFile currentDir = null;
|
||||
if (mFile != null && mFile.isFolder()) {
|
||||
currentDir = mFile;
|
||||
} else {
|
||||
currentDir = getStorageManager().getFileById(mFile.getParentId());
|
||||
}
|
||||
inRoot = (mFile == null || currentDir.getParentId() == 0);
|
||||
if (!inRoot) {
|
||||
title = mFile.getFileName();
|
||||
title = mFile.getFileName();
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue