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 @@ -1504,13 +1504,23 @@ protected void setTitle() {
15041504 setTitle (R .string .drawer_item_shared );
15051505 break ;
15061506 default :
1507- setTitle (themeUtils .getDefaultDisplayNameForRootFolder (getContext ()), false );
1507+ setTitle (themeUtils .getDefaultDisplayNameForRootFolder (getContext ()), isRoot () );
15081508 break ;
15091509 }
15101510 }
15111511
15121512 }
15131513
1514+ //NMC Customization
1515+ //for NMC we are using defaultToolbar instead searchToolbar for which we needed customization
1516+ private boolean isRoot () {
1517+ Activity activity ;
1518+ if ((activity = getActivity ()) != null && activity instanceof FileDisplayActivity ) {
1519+ return ((FileDisplayActivity ) activity ).isRoot (((FileDisplayActivity ) activity ).getFile ());
1520+ }
1521+ return false ;
1522+ }
1523+
15141524 protected void prepareActionBarItems (SearchEvent event ) {
15151525 if (event != null ) {
15161526 switch (event .getSearchType ()) {
@@ -1571,7 +1581,7 @@ public void onMessageEvent(ChangeMenuEvent changeMenuEvent) {
15711581 ((FileDisplayActivity ) activity ).initSyncBroadcastReceiver ();
15721582 }
15731583
1574- setTitle (themeUtils .getDefaultDisplayNameForRootFolder (getContext ()), false );
1584+ setTitle (themeUtils .getDefaultDisplayNameForRootFolder (getContext ()), isRoot () );
15751585 activity .getIntent ().removeExtra (OCFileListFragment .SEARCH_EVENT );
15761586 }
15771587
You can’t perform that action at this time.
0 commit comments