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 @@ -1508,13 +1508,23 @@ protected void setTitle() {
15081508 setTitle (R .string .drawer_item_shared );
15091509 break ;
15101510 default :
1511- setTitle (themeUtils .getDefaultDisplayNameForRootFolder (getContext ()), false );
1511+ setTitle (themeUtils .getDefaultDisplayNameForRootFolder (getContext ()), isRoot () );
15121512 break ;
15131513 }
15141514 }
15151515
15161516 }
15171517
1518+ //NMC Customization
1519+ //for NMC we are using defaultToolbar instead searchToolbar for which we needed customization
1520+ private boolean isRoot () {
1521+ Activity activity ;
1522+ if ((activity = getActivity ()) != null && activity instanceof FileDisplayActivity ) {
1523+ return ((FileDisplayActivity ) activity ).isRoot (((FileDisplayActivity ) activity ).getFile ());
1524+ }
1525+ return false ;
1526+ }
1527+
15181528 protected void prepareActionBarItems (SearchEvent event ) {
15191529 if (event != null ) {
15201530 switch (event .getSearchType ()) {
@@ -1575,7 +1585,7 @@ public void onMessageEvent(ChangeMenuEvent changeMenuEvent) {
15751585 ((FileDisplayActivity ) activity ).initSyncBroadcastReceiver ();
15761586 }
15771587
1578- setTitle (themeUtils .getDefaultDisplayNameForRootFolder (getContext ()), false );
1588+ setTitle (themeUtils .getDefaultDisplayNameForRootFolder (getContext ()), isRoot () );
15791589 activity .getIntent ().removeExtra (OCFileListFragment .SEARCH_EVENT );
15801590 }
15811591
You can’t perform that action at this time.
0 commit comments