Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ae81df41 authored by Tony Huang's avatar Tony Huang
Browse files

Fix display bug on directory header title

Update title after direcory model updated.

Change-Id: Ic00295665d82b63ee2517a012f82cd0a65c2489b
Fix: 120994661
Test: atest DocumentsUITests
parent 978bdfb3
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -414,7 +414,6 @@ public abstract class BaseActivity
        if (DirectoryFragment.get(getSupportFragmentManager()) == null) {
            refreshCurrentRootAndDirectory(AnimationView.ANIM_NONE);
        }
        updateHeaderTitle();
    }

    /**
@@ -527,6 +526,11 @@ public abstract class BaseActivity
    }

    public void updateHeaderTitle() {
        if (!mState.stack.isInitialized()) {
            //stack has not initialized, the header will update after the stack finishes loading
            return;
        }

        final RootInfo root = mState.stack.getRoot();
        final String rootTitle = root.title;
        String result;
+2 −0
Original line number Diff line number Diff line
@@ -1095,6 +1095,8 @@ public class DirectoryFragment extends Fragment implements SwipeRefreshLayout.On
                // For orientation changed case, sometimes the docs loading comes after the menu
                // update. We need to update the menu here to ensure the status is correct.
                mInjector.menuManager.updateOptionMenu();

                mActivity.updateHeaderTitle();
            }
        }
    }