mirror of https://github.com/zulip/zulip.git
streams: Re-highlight row after re-subscribing.
When re-subscribing by way of the "Subscribe" button in the right side settings panel, the row will now be marked as active to highlight that the row is still selected and being looked at. Fixes: #6955.
This commit is contained in:
parent
c8090aafa4
commit
a93bedc8e6
|
@ -250,6 +250,12 @@ exports.stream_description_match_stream_ids = [];
|
||||||
// query is now an object rather than a string.
|
// query is now an object rather than a string.
|
||||||
// Query { input: String, subscribed_only: Boolean }
|
// Query { input: String, subscribed_only: Boolean }
|
||||||
exports.filter_table = function (query) {
|
exports.filter_table = function (query) {
|
||||||
|
var selected_row = window.location.hash.split(/\//)[1];
|
||||||
|
|
||||||
|
if (parseFloat(selected_row)) {
|
||||||
|
$(".stream-row[data-stream-id='" + selected_row + "']").addClass("active");
|
||||||
|
}
|
||||||
|
|
||||||
exports.stream_name_match_stream_ids = [];
|
exports.stream_name_match_stream_ids = [];
|
||||||
exports.stream_description_match_stream_ids = [];
|
exports.stream_description_match_stream_ids = [];
|
||||||
var others = [];
|
var others = [];
|
||||||
|
@ -366,6 +372,7 @@ exports.setup_page = function (callback) {
|
||||||
subscriptions: sub_rows,
|
subscriptions: sub_rows,
|
||||||
hide_all_streams: !should_list_all_streams(),
|
hide_all_streams: !should_list_all_streams(),
|
||||||
};
|
};
|
||||||
|
|
||||||
var rendered = templates.render('subscription_table_body', template_data);
|
var rendered = templates.render('subscription_table_body', template_data);
|
||||||
$('#subscriptions_table').append(rendered);
|
$('#subscriptions_table').append(rendered);
|
||||||
initialize_components();
|
initialize_components();
|
||||||
|
|
Loading…
Reference in New Issue