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