mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
hotkeys: Go through hashchange to open drafts.
This helps us keep all the logic related to changing hash of webapp in hashchange itself, like not showing drafts to web-pubic-visitors.
This commit is contained in:
@@ -320,7 +320,7 @@ run_test("drafts closed w/other overlay", (override) => {
|
|||||||
|
|
||||||
run_test("drafts closed launch", (override) => {
|
run_test("drafts closed launch", (override) => {
|
||||||
override(overlays, "is_active", () => false);
|
override(overlays, "is_active", () => false);
|
||||||
assert_mapping("d", drafts, "launch");
|
assert_mapping("d", browser_history, "go_to_location");
|
||||||
});
|
});
|
||||||
|
|
||||||
run_test("misc", () => {
|
run_test("misc", () => {
|
||||||
|
|||||||
@@ -804,7 +804,7 @@ export function process_hotkey(e, hotkey) {
|
|||||||
compose_actions.start("private", {trigger: "compose_hotkey"});
|
compose_actions.start("private", {trigger: "compose_hotkey"});
|
||||||
return true;
|
return true;
|
||||||
case "open_drafts":
|
case "open_drafts":
|
||||||
drafts.launch();
|
browser_history.go_to_location("drafts");
|
||||||
return true;
|
return true;
|
||||||
case "C_deprecated":
|
case "C_deprecated":
|
||||||
ui.maybe_show_deprecation_notice("C");
|
ui.maybe_show_deprecation_notice("C");
|
||||||
|
|||||||
Reference in New Issue
Block a user