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 @@ -1524,13 +1524,23 @@ protected void setTitle() {
15241524 setTitle (R .string .drawer_item_shared );
15251525 break ;
15261526 default :
1527- setTitle (themeUtils .getDefaultDisplayNameForRootFolder (getContext ()), false );
1527+ setTitle (themeUtils .getDefaultDisplayNameForRootFolder (getContext ()), isRoot () );
15281528 break ;
15291529 }
15301530 }
15311531
15321532 }
15331533
1534+ //NMC Customization
1535+ //for NMC we are using defaultToolbar instead searchToolbar for which we needed customization
1536+ private boolean isRoot () {
1537+ Activity activity ;
1538+ if ((activity = getActivity ()) != null && activity instanceof FileDisplayActivity ) {
1539+ return ((FileDisplayActivity ) activity ).isRoot (getCurrentFile ());
1540+ }
1541+ return false ;
1542+ }
1543+
15341544 protected void prepareActionBarItems (SearchEvent event ) {
15351545 if (event != null ) {
15361546 switch (event .getSearchType ()) {
@@ -1591,7 +1601,7 @@ public void onMessageEvent(ChangeMenuEvent changeMenuEvent) {
15911601 ((FileDisplayActivity ) activity ).initSyncBroadcastReceiver ();
15921602 }
15931603
1594- setTitle (themeUtils .getDefaultDisplayNameForRootFolder (getContext ()), false );
1604+ setTitle (themeUtils .getDefaultDisplayNameForRootFolder (getContext ()), isRoot () );
15951605 activity .getIntent ().removeExtra (OCFileListFragment .SEARCH_EVENT );
15961606 }
15971607
You can’t perform that action at this time.
0 commit comments