mirror of https://github.com/zulip/zulip.git
user_topics.js: Rename `visibility_policy_inherit` -> `inherit`.
This makes our frontend code less verbose, and makes this name consistent with the names of other visibility policies (which do not have the `VISIBILITY_POLICY` prefix).
This commit is contained in:
parent
ae72777c77
commit
4d5e12961a
|
@ -8,7 +8,7 @@ import {get_time_from_date_muted} from "./util";
|
||||||
const muted_topics = new Map();
|
const muted_topics = new Map();
|
||||||
|
|
||||||
export const visibility_policy = {
|
export const visibility_policy = {
|
||||||
VISIBILITY_POLICY_INHERIT: 0,
|
INHERIT: 0,
|
||||||
MUTED: 1,
|
MUTED: 1,
|
||||||
UNMUTED: 2,
|
UNMUTED: 2,
|
||||||
FOLLOWED: 3,
|
FOLLOWED: 3,
|
||||||
|
@ -74,7 +74,7 @@ export function set_user_topic(user_topic) {
|
||||||
case visibility_policy.MUTED:
|
case visibility_policy.MUTED:
|
||||||
add_muted_topic(stream_id, topic, date_muted);
|
add_muted_topic(stream_id, topic, date_muted);
|
||||||
break;
|
break;
|
||||||
case visibility_policy.VISIBILITY_POLICY_INHERIT:
|
case visibility_policy.INHERIT:
|
||||||
remove_muted_topic(stream_id, topic);
|
remove_muted_topic(stream_id, topic);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -152,7 +152,7 @@ test("set_user_topics", () => {
|
||||||
stream_id: design.stream_id,
|
stream_id: design.stream_id,
|
||||||
topic_name: "typography",
|
topic_name: "typography",
|
||||||
last_updated: "1577836800",
|
last_updated: "1577836800",
|
||||||
visibility_policy: visibility_policy.VISIBILITY_POLICY_INHERIT,
|
visibility_policy: visibility_policy.INHERIT,
|
||||||
});
|
});
|
||||||
assert.ok(!user_topics.is_topic_muted(design.stream_id, "typography"));
|
assert.ok(!user_topics.is_topic_muted(design.stream_id, "typography"));
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue