Removed the spamfilter_context_menu and add_tags_context_menu options and always show the context menu when the corresponding feature is active. See #609

This commit is contained in:
Mic 2026-01-29 23:45:00 +01:00
parent f489e65483
commit 3ba98c7d90
5 changed files with 7 additions and 61 deletions

View file

@ -1371,22 +1371,6 @@
"message": "Summarize",
"description": ""
},
"prefs_OptionText_add_tags_context_menu": {
"message": "Show the \"Add tags\" context menu item",
"description": ""
},
"prefs_OptionText_add_tags_context_menu_Info": {
"message": "If checked, the \"Add tags\" context menu item will be shown when right-clicking on an email in the messages list.",
"description": ""
},
"prefs_OptionText_spamfilter_context_menu": {
"message": "Show the \"Analyze for spam\" context menu item",
"description": ""
},
"prefs_OptionText_spamfilter_context_menu_Info": {
"message": "If checked, the \"Analyze for spam\" context menu item will be shown when right-clicking on an email in the messages list.",
"description": ""
},
"noActiveCalendar": {
"message": "No editable calendar found!",
"description": ""

View file

@ -809,8 +809,6 @@ async function reload_pref_init(){
summarize: prefs_default.summarize,
spamfilter_threshold: prefs_default.spamfilter_threshold,
dynamic_menu_force_enter: prefs_default.dynamic_menu_force_enter,
add_tags_context_menu: prefs_default.add_tags_context_menu,
spamfilter_context_menu: prefs_default.spamfilter_context_menu,
...getDynamicSettingsDefaults(['use_specific_integration', 'connection_type'])
});
_process_incoming = prefs_init.add_tags_auto || prefs_init.spamfilter;
@ -891,34 +889,16 @@ function setupStorageChangeListener() {
}
// context menu changes for add_tags and spamfilter
if (changes.add_tags_context_menu) {
if(changes.add_tags_context_menu.newValue){
if (changes.add_tags) {
if(changes.add_tags.newValue){
addContextMenu(contextMenuID_AddTags);
}else{
removeContextMenu(contextMenuID_AddTags);
}
}
if (changes.add_tags) {
if(changes.add_tags.newValue){
if(prefs_init.add_tags_context_menu){
addContextMenu(contextMenuID_AddTags);
}
}else{
removeContextMenu(contextMenuID_AddTags);
}
}
if (changes.spamfilter_context_menu) {
if(changes.spamfilter_context_menu.newValue){
addContextMenu(contextMenuID_Spamfilter);
}else{
removeContextMenu(contextMenuID_Spamfilter);
}
}
if (changes.spamfilter) {
if(changes.spamfilter.newValue){
if(prefs_init.spamfilter_context_menu){
addContextMenu(contextMenuID_Spamfilter);
}
addContextMenu(contextMenuID_Spamfilter);
}else{
removeContextMenu(contextMenuID_Spamfilter);
}
@ -982,12 +962,12 @@ function removeContextMenu(menu_id) {
function addContextMenuItems() {
// Add Context menu: Add tags
if(prefs_init.add_tags && prefs_init.add_tags_context_menu && checkAPIIntegration(prefs_init.connection_type, prefs_init.add_tags_use_specific_integration,prefs_init.add_tags_connection_type)){
if(prefs_init.add_tags && checkAPIIntegration(prefs_init.connection_type, prefs_init.add_tags_use_specific_integration,prefs_init.add_tags_connection_type)){
addContextMenu(contextMenuID_AddTags);
}
// Add Context menu: Spamfilter
if(prefs_init.spamfilter && prefs_init.spamfilter_context_menu && checkAPIIntegration(prefs_init.connection_type, prefs_init.spamfilter_use_specific_integration,prefs_init.spamfilter_connection_type)){
if(prefs_init.spamfilter && checkAPIIntegration(prefs_init.connection_type, prefs_init.spamfilter_use_specific_integration,prefs_init.spamfilter_connection_type)){
addContextMenu(contextMenuID_Spamfilter);
}

View file

@ -123,7 +123,6 @@ export const prefs_default = {
add_tags_auto_only_inbox: true,
add_tags_auto_uselist: false,
add_tags_auto_uselist_list: '',
add_tags_context_menu: true,
add_tags_enabled_accounts: [],
get_calendar_event: true,
get_task: true,
@ -131,7 +130,6 @@ export const prefs_default = {
calendar_timezone: '',
spamfilter: false,
spamfilter_threshold: 70,
spamfilter_context_menu: true,
spamfilter_enabled_accounts: [],
summarize: false,
...generated_prefs

View file

@ -101,15 +101,7 @@
</label>
</td>
</tr>
<tr class="add_tags_tr">
<td><span class="opt_title">__MSG_prefs_OptionText_add_tags_context_menu__</span></td>
<td>
<label>
<input type="checkbox" id="add_tags_context_menu" name="add_tags_context_menu" class="option-input" />
__MSG_prefs_OptionText_add_tags_context_menu_Info__
</label>
</td>
</tr>
<tr class="add_tags_tr">
<td><span class="opt_title">__MSG_prefs_OptionText_add_tags_auto_force_existing__</span></td>
<td>

View file

@ -35,15 +35,7 @@
</label>
</td>
</tr>
<tr class="spamfilter_tr">
<td><span class="opt_title">__MSG_prefs_OptionText_spamfilter_context_menu__</span></td>
<td>
<label>
<input type="checkbox" id="spamfilter_context_menu" name="spamfilter_context_menu" class="option-input" />
__MSG_prefs_OptionText_spamfilter_context_menu_Info__
</label>
</td>
</tr>
</table>
<div id="spamfilter_container">
<span class="section_title">__MSG_SpamFilter_prompt_text_title__</span><span id="spamfilter_prompt_unsaved" class="unsaved hidden"> __MSG_customPrompts_unsaved_changes__</span>