summaryrefslogtreecommitdiff
path: root/mailnews/base
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-11-10 23:41:56 -0500
committerMatt A. Tobin <email@mattatobin.com>2019-11-10 23:41:56 -0500
commit05b84061f2cc7ca6cf009ad2fc2ed7556cfcae4e (patch)
tree8d789fb8c9833609dcd3fc7a57a4cfac3a683659 /mailnews/base
parent1d5ec356b3d5ec98177a76eaf2d32e728fd1a742 (diff)
downloaduxp-05b84061f2cc7ca6cf009ad2fc2ed7556cfcae4e.tar.gz
Bug 1523048 - when copying a filter, copy its triggering events too (filterType).
Tag #1273
Diffstat (limited to 'mailnews/base')
-rw-r--r--mailnews/base/search/content/FilterEditor.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/mailnews/base/search/content/FilterEditor.js b/mailnews/base/search/content/FilterEditor.js
index 986185d349..ecfe9febc5 100644
--- a/mailnews/base/search/content/FilterEditor.js
+++ b/mailnews/base/search/content/FilterEditor.js
@@ -124,8 +124,8 @@ function filterEditorOnLoad()
else if ("copiedFilter" in args)
{
// we are copying a filter
- var copiedFilter = args.copiedFilter;
- var copiedName = gFilterBundle.getFormattedString("copyToNewFilterName",
+ let copiedFilter = args.copiedFilter;
+ let copiedName = gFilterBundle.getFormattedString("copyToNewFilterName",
[copiedFilter.filterName]);
let newFilter = gFilterList.createFilter(copiedName);
@@ -142,13 +142,15 @@ function filterEditorOnLoad()
var searchTerm = copiedFilter.searchTerms.QueryElementAt(i,
Components.interfaces.nsIMsgSearchTerm);
- var newTerm = newFilter.createTerm();
+ let newTerm = newFilter.createTerm();
newTerm.attrib = searchTerm.attrib;
newTerm.op = searchTerm.op;
newTerm.booleanAnd = searchTerm.booleanAnd;
newTerm.value = searchTerm.value;
newFilter.appendTerm(newTerm);
- };
+ }
+
+ newFilter.filterType = copiedFilter.filterType;
gPreFillName = copiedName;
gFilter = newFilter;