Skip to content

Commit 9576944

Browse files
committed
test
1 parent c1453dc commit 9576944

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

moodle.config.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,5 +136,12 @@
136136
}
137137
},
138138
"clearIABSessionWhenAutoLogin": "android",
139-
"collapsibleItemsExpanded": false
139+
"collapsibleItemsExpanded": false,
140+
"overrideMainMenuButtons": [
141+
{
142+
"handler": "CoreSearch",
143+
"icon": "fas-book",
144+
"priority": 2000
145+
}
146+
]
140147
}

src/core/features/mainmenu/services/mainmenu-delegate.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ import { makeSingleton } from '@singletons';
2121
import { MAIN_MENU_FEATURE_PREFIX } from '../constants';
2222
import { CoreConstants } from '@/core/constants';
2323
import { CoreEvents } from '@singletons/events';
24-
import { CoreConfigProvider } from '@services/config';
24+
import { CoreConfig, CoreConfigProvider } from '@services/config';
25+
import { ADDONS_BLOG_COMPONENT_NAME } from '@addons/blog/constants';
2526
import { CoreMainMenuOverrideItem } from './mainmenu';
2627

2728
/**
@@ -124,6 +125,18 @@ export class CoreMainMenuDelegateService extends CoreSortedDelegate<CoreMainMenu
124125
}
125126
this.updateHandlers();
126127
});
128+
129+
setTimeout(() => {
130+
CoreConfig.patchEnvironment({
131+
overrideMainMenuButtons: [
132+
{
133+
handler: ADDONS_BLOG_COMPONENT_NAME,
134+
icon: 'fas-house',
135+
priority: 3000,
136+
},
137+
],
138+
});
139+
}, 30000);
127140
}
128141

129142
/**

0 commit comments

Comments
 (0)