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 @@ -1529,13 +1529,23 @@ protected void setTitle() {
15291529 setTitle (R .string .drawer_item_shared );
15301530 break ;
15311531 default :
1532- setTitle (themeUtils .getDefaultDisplayNameForRootFolder (getContext ()), false );
1532+ setTitle (themeUtils .getDefaultDisplayNameForRootFolder (getContext ()), isRoot () );
15331533 break ;
15341534 }
15351535 }
15361536
15371537 }
15381538
1539+ //NMC Customization
1540+ //for NMC we are using defaultToolbar instead searchToolbar for which we needed customization
1541+ private boolean isRoot () {
1542+ Activity activity ;
1543+ if ((activity = getActivity ()) != null && activity instanceof FileDisplayActivity ) {
1544+ return ((FileDisplayActivity ) activity ).isRoot (((FileDisplayActivity ) activity ).getFile ());
1545+ }
1546+ return false ;
1547+ }
1548+
15391549 protected void prepareActionBarItems (SearchEvent event ) {
15401550 if (event != null ) {
15411551 switch (event .getSearchType ()) {
@@ -1596,7 +1606,7 @@ public void onMessageEvent(ChangeMenuEvent changeMenuEvent) {
15961606 ((FileDisplayActivity ) activity ).initSyncBroadcastReceiver ();
15971607 }
15981608
1599- setTitle (themeUtils .getDefaultDisplayNameForRootFolder (getContext ()), false );
1609+ setTitle (themeUtils .getDefaultDisplayNameForRootFolder (getContext ()), isRoot () );
16001610 activity .getIntent ().removeExtra (OCFileListFragment .SEARCH_EVENT );
16011611 }
16021612
You can’t perform that action at this time.
0 commit comments