1
0
mirror of https://github.com/TeamNewPipe/NewPipe/ synced 2024-12-11 17:15:47 +01:00

Enable toolbar title visibility when setting a new one

This commit is contained in:
Mauricio Colli 2019-10-19 21:31:17 -03:00
parent a5b7666188
commit 38a0395d45
No known key found for this signature in database
GPG Key ID: F200BFD6F29DDD85

View File

@ -107,6 +107,7 @@ public abstract class BaseFragment extends Fragment {
if (DEBUG) Log.d(TAG, "setTitle() called with: title = [" + title + "]"); if (DEBUG) Log.d(TAG, "setTitle() called with: title = [" + title + "]");
if((!useAsFrontPage || mIsVisibleToUser) if((!useAsFrontPage || mIsVisibleToUser)
&& (activity != null && activity.getSupportActionBar() != null)) { && (activity != null && activity.getSupportActionBar() != null)) {
activity.getSupportActionBar().setDisplayShowTitleEnabled(true);
activity.getSupportActionBar().setTitle(title); activity.getSupportActionBar().setTitle(title);
} }
} }