mirror of https://github.com/zulip/zulip.git
filter: Fix sorted_term_types sorting of streams:public.
We had the wrong term type key in the sorting declaration, resulting in this operator being always sorted last.
This commit is contained in:
parent
c2876b0271
commit
e0d5d5f136
|
@ -1233,6 +1233,11 @@ run_test('term_type', () => {
|
||||||
['stream', 'stream', 'topic']
|
['stream', 'stream', 'topic']
|
||||||
);
|
);
|
||||||
|
|
||||||
|
assert_term_sort(
|
||||||
|
['search', 'streams-public'],
|
||||||
|
['streams-public', 'search']
|
||||||
|
);
|
||||||
|
|
||||||
const terms = [
|
const terms = [
|
||||||
{operator: 'topic', operand: 'lunch'},
|
{operator: 'topic', operand: 'lunch'},
|
||||||
{operator: 'sender', operand: 'steve@foo.com'},
|
{operator: 'sender', operand: 'steve@foo.com'},
|
||||||
|
|
|
@ -623,7 +623,7 @@ Filter.term_type = function (term) {
|
||||||
Filter.sorted_term_types = function (term_types) {
|
Filter.sorted_term_types = function (term_types) {
|
||||||
const levels = [
|
const levels = [
|
||||||
'in',
|
'in',
|
||||||
'streams',
|
'streams-public',
|
||||||
'stream', 'topic',
|
'stream', 'topic',
|
||||||
'pm-with', 'group-pm-with', 'sender',
|
'pm-with', 'group-pm-with', 'sender',
|
||||||
'near', 'id',
|
'near', 'id',
|
||||||
|
|
Loading…
Reference in New Issue