File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
app/src/main/java/com/owncloud/android/ui/fragment Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -1521,13 +1521,23 @@ protected void setTitle() {
15211521 setTitle (R .string .drawer_item_shared );
15221522 break ;
15231523 default :
1524- setTitle (themeUtils .getDefaultDisplayNameForRootFolder (getContext ()), false );
1524+ setTitle (themeUtils .getDefaultDisplayNameForRootFolder (getContext ()), isRoot () );
15251525 break ;
15261526 }
15271527 }
15281528
15291529 }
15301530
1531+ //NMC Customization
1532+ //for NMC we are using defaultToolbar instead searchToolbar for which we needed customization
1533+ private boolean isRoot () {
1534+ Activity activity ;
1535+ if ((activity = getActivity ()) != null && activity instanceof FileDisplayActivity ) {
1536+ return ((FileDisplayActivity ) activity ).isRoot (((FileDisplayActivity ) activity ).getFile ());
1537+ }
1538+ return false ;
1539+ }
1540+
15311541 protected void prepareActionBarItems (SearchEvent event ) {
15321542 if (event != null ) {
15331543 switch (event .getSearchType ()) {
@@ -1588,7 +1598,7 @@ public void onMessageEvent(ChangeMenuEvent changeMenuEvent) {
15881598 ((FileDisplayActivity ) activity ).initSyncBroadcastReceiver ();
15891599 }
15901600
1591- setTitle (themeUtils .getDefaultDisplayNameForRootFolder (getContext ()), false );
1601+ setTitle (themeUtils .getDefaultDisplayNameForRootFolder (getContext ()), isRoot () );
15921602 activity .getIntent ().removeExtra (OCFileListFragment .SEARCH_EVENT );
15931603 }
15941604
You can’t perform that action at this time.
0 commit comments