mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
Add "all" and "subscribed" deeplink for subscriptions.
This adds a deep link to “all” which is to show all streams, along with "subscribed" for only streams you are subscribed to.
This commit is contained in:
committed by
Tim Abbott
parent
461066cab9
commit
434317b4cc
@@ -388,7 +388,7 @@ $(function () {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
window.location.hash = "subscriptions/new";
|
||||
window.location.hash = "subscriptions/all";
|
||||
});
|
||||
|
||||
// FEEDBACK
|
||||
|
||||
@@ -739,6 +739,10 @@ exports.change_state = (function () {
|
||||
if (hash.arguments[0] === "new") {
|
||||
$("#create_stream_button").click();
|
||||
components.toggle.lookup("stream-filter-toggle").goto("All streams");
|
||||
} else if (hash.arguments[0] === "all") {
|
||||
components.toggle.lookup("stream-filter-toggle").goto("All streams");
|
||||
} else if (hash.arguments[0] === "subscribed") {
|
||||
components.toggle.lookup("stream-filter-toggle").goto("Subscribed");
|
||||
// if the first argument is a valid number.
|
||||
} else if (/\d+/.test(hash.arguments[0])) {
|
||||
var $stream_row = $(".stream-row[data-stream-id='" + hash.arguments[0] + "']");
|
||||
|
||||
Reference in New Issue
Block a user