reloading menu fixed

This commit is contained in:
mic 2025-01-12 22:37:44 +01:00
parent 6f4386381b
commit a4a0dbdb21

View file

@ -214,7 +214,10 @@ messenger.runtime.onMessage.addListener((message, sender, sendResponse) => {
case 'reload_menus':
async function _reload_menus() {
let prefs_reload = await browser.storage.sync.get({add_tags: true, get_calendar_event: false, connection_type: 'chatgpt_web'});
menus.reload((prefs_reload.add_tags||prefs_reload.get_calendar_event) && (prefs_reload.connection_type !== "chatgpt_web"));
doGetCalendarEvent(prefs_reload.get_calendar_event).then(calendarEvent => {
const special_prompts_ids = getActiveSpecialPromptsIDs(prefs_reload.add_tags, calendarEvent, (prefs_reload.connection_type === "chatgpt_web"));
menus.reload(special_prompts_ids);
});
taLog.log("Reloading menus");
return true;
}