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:
Aman Agrawal
2021-05-18 01:48:34 +00:00
committed by Tim Abbott
parent f701bfff28
commit d666b465b9
2 changed files with 2 additions and 2 deletions

View File

@@ -320,7 +320,7 @@ run_test("drafts closed w/other overlay", (override) => {
run_test("drafts closed launch", (override) => {
override(overlays, "is_active", () => false);
assert_mapping("d", drafts, "launch");
assert_mapping("d", browser_history, "go_to_location");
});
run_test("misc", () => {

View File

@@ -804,7 +804,7 @@ export function process_hotkey(e, hotkey) {
compose_actions.start("private", {trigger: "compose_hotkey"});
return true;
case "open_drafts":
drafts.launch();
browser_history.go_to_location("drafts");
return true;
case "C_deprecated":
ui.maybe_show_deprecation_notice("C");