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 @@ -1500,13 +1500,23 @@ protected void setTitle() {
15001500 setTitle (R .string .drawer_item_shared );
15011501 break ;
15021502 default :
1503- setTitle (themeUtils .getDefaultDisplayNameForRootFolder (getContext ()), false );
1503+ setTitle (themeUtils .getDefaultDisplayNameForRootFolder (getContext ()), isRoot () );
15041504 break ;
15051505 }
15061506 }
15071507
15081508 }
15091509
1510+ //NMC Customization
1511+ //for NMC we are using defaultToolbar instead searchToolbar for which we needed customization
1512+ private boolean isRoot () {
1513+ Activity activity ;
1514+ if ((activity = getActivity ()) != null && activity instanceof FileDisplayActivity ) {
1515+ return ((FileDisplayActivity ) activity ).isRoot (((FileDisplayActivity ) activity ).getFile ());
1516+ }
1517+ return false ;
1518+ }
1519+
15101520 protected void prepareActionBarItems (SearchEvent event ) {
15111521 if (event != null ) {
15121522 switch (event .getSearchType ()) {
@@ -1567,7 +1577,7 @@ public void onMessageEvent(ChangeMenuEvent changeMenuEvent) {
15671577 ((FileDisplayActivity ) activity ).initSyncBroadcastReceiver ();
15681578 }
15691579
1570- setTitle (themeUtils .getDefaultDisplayNameForRootFolder (getContext ()), false );
1580+ setTitle (themeUtils .getDefaultDisplayNameForRootFolder (getContext ()), isRoot () );
15711581 activity .getIntent ().removeExtra (OCFileListFragment .SEARCH_EVENT );
15721582 }
15731583
You can’t perform that action at this time.
0 commit comments