Bug 564156 - Quick Filter Bar tag filter is always sticky, should not be. v1 make the tag filter's propagateState logic actually use aSticky in logic with test. r+approval-thunderbird-3.1=bienvenu

This commit is contained in:
Andrew Sutherland 2010-05-07 06:01:28 -07:00
Родитель c151b6b306
Коммит 56393d87fc
2 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -815,8 +815,8 @@ let TagFacetingFilter = {
* We need to clone our state if it's an object to avoid bad sharing.
*/
propagateState: function(aOld, aSticky) {
// stay disabled when disabled
if (aOld == null)
// stay disabled when disabled, get disabled when not sticky
if (aOld == null || !aSticky)
return null;
if (this.isSimple(aOld))
return aOld ? true : false; // could be an object, need to convert.

Просмотреть файл

@ -127,6 +127,12 @@ function test_sticky_tags() {
be_in_folder(folderOne);
assert_tag_constraints_visible(tagA, tagC);
assert_messages_in_view([setTagA1]);
// -- if we turn off sticky, make sure that things clear when we change
// folders. (we had a bug with this before.)
toggle_boolean_constraints("sticky");
be_in_folder(folderTwo);
assert_constraints_expressed({});
}
/**