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:
parent
f489e65483
commit
3ba98c7d90
5 changed files with 7 additions and 61 deletions
|
|
@ -1371,22 +1371,6 @@
|
||||||
"message": "Summarize",
|
"message": "Summarize",
|
||||||
"description": ""
|
"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": {
|
"noActiveCalendar": {
|
||||||
"message": "No editable calendar found!",
|
"message": "No editable calendar found!",
|
||||||
"description": ""
|
"description": ""
|
||||||
|
|
|
||||||
|
|
@ -809,8 +809,6 @@ async function reload_pref_init(){
|
||||||
summarize: prefs_default.summarize,
|
summarize: prefs_default.summarize,
|
||||||
spamfilter_threshold: prefs_default.spamfilter_threshold,
|
spamfilter_threshold: prefs_default.spamfilter_threshold,
|
||||||
dynamic_menu_force_enter: prefs_default.dynamic_menu_force_enter,
|
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'])
|
...getDynamicSettingsDefaults(['use_specific_integration', 'connection_type'])
|
||||||
});
|
});
|
||||||
_process_incoming = prefs_init.add_tags_auto || prefs_init.spamfilter;
|
_process_incoming = prefs_init.add_tags_auto || prefs_init.spamfilter;
|
||||||
|
|
@ -891,34 +889,16 @@ function setupStorageChangeListener() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// context menu changes for add_tags and spamfilter
|
// context menu changes for add_tags and spamfilter
|
||||||
if (changes.add_tags_context_menu) {
|
if (changes.add_tags) {
|
||||||
if(changes.add_tags_context_menu.newValue){
|
if(changes.add_tags.newValue){
|
||||||
addContextMenu(contextMenuID_AddTags);
|
addContextMenu(contextMenuID_AddTags);
|
||||||
}else{
|
}else{
|
||||||
removeContextMenu(contextMenuID_AddTags);
|
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) {
|
||||||
if(changes.spamfilter.newValue){
|
if(changes.spamfilter.newValue){
|
||||||
if(prefs_init.spamfilter_context_menu){
|
addContextMenu(contextMenuID_Spamfilter);
|
||||||
addContextMenu(contextMenuID_Spamfilter);
|
|
||||||
}
|
|
||||||
}else{
|
}else{
|
||||||
removeContextMenu(contextMenuID_Spamfilter);
|
removeContextMenu(contextMenuID_Spamfilter);
|
||||||
}
|
}
|
||||||
|
|
@ -982,12 +962,12 @@ function removeContextMenu(menu_id) {
|
||||||
|
|
||||||
function addContextMenuItems() {
|
function addContextMenuItems() {
|
||||||
// Add Context menu: Add tags
|
// 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);
|
addContextMenu(contextMenuID_AddTags);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add Context menu: Spamfilter
|
// 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);
|
addContextMenu(contextMenuID_Spamfilter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,6 @@ export const prefs_default = {
|
||||||
add_tags_auto_only_inbox: true,
|
add_tags_auto_only_inbox: true,
|
||||||
add_tags_auto_uselist: false,
|
add_tags_auto_uselist: false,
|
||||||
add_tags_auto_uselist_list: '',
|
add_tags_auto_uselist_list: '',
|
||||||
add_tags_context_menu: true,
|
|
||||||
add_tags_enabled_accounts: [],
|
add_tags_enabled_accounts: [],
|
||||||
get_calendar_event: true,
|
get_calendar_event: true,
|
||||||
get_task: true,
|
get_task: true,
|
||||||
|
|
@ -131,7 +130,6 @@ export const prefs_default = {
|
||||||
calendar_timezone: '',
|
calendar_timezone: '',
|
||||||
spamfilter: false,
|
spamfilter: false,
|
||||||
spamfilter_threshold: 70,
|
spamfilter_threshold: 70,
|
||||||
spamfilter_context_menu: true,
|
|
||||||
spamfilter_enabled_accounts: [],
|
spamfilter_enabled_accounts: [],
|
||||||
summarize: false,
|
summarize: false,
|
||||||
...generated_prefs
|
...generated_prefs
|
||||||
|
|
|
||||||
|
|
@ -101,15 +101,7 @@
|
||||||
</label>
|
</label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</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">
|
<tr class="add_tags_tr">
|
||||||
<td><span class="opt_title">__MSG_prefs_OptionText_add_tags_auto_force_existing__</span></td>
|
<td><span class="opt_title">__MSG_prefs_OptionText_add_tags_auto_force_existing__</span></td>
|
||||||
<td>
|
<td>
|
||||||
|
|
|
||||||
|
|
@ -35,15 +35,7 @@
|
||||||
</label>
|
</label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</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>
|
</table>
|
||||||
<div id="spamfilter_container">
|
<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>
|
<span class="section_title">__MSG_SpamFilter_prompt_text_title__</span><span id="spamfilter_prompt_unsaved" class="unsaved hidden"> __MSG_customPrompts_unsaved_changes__</span>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue