Do initial stream color fetch in subs.js instead of zephyr.js

(imported from commit e819e04951be037241b43c8c7061c7979038b7b8)
This commit is contained in:
Zev Benjamin 2013-01-22 17:31:04 -05:00
parent 6e05a72898
commit 72ebecf801
2 changed files with 3 additions and 4 deletions

View File

@ -147,7 +147,7 @@ exports.get_color = function (stream_name) {
return stream_info[lstream_name].color;
};
exports.fetch_colors = function () {
function fetch_colors() {
$.ajax({
type: 'GET',
url: '/json/subscriptions/property',
@ -166,7 +166,7 @@ exports.fetch_colors = function () {
}
}
});
};
}
exports.setup_page = function () {
util.make_loading_indicator($('#subs_page_loading_indicator'));
@ -290,6 +290,7 @@ $(function () {
for (i = 0; i < stream_list.length; i++) {
stream_info[stream_list[i].toLowerCase()] = create_sub(stream_list[i]);
}
fetch_colors();
$("#add_new_subscription").on("submit", function (e) {
e.preventDefault();

View File

@ -718,8 +718,6 @@ $(function () {
}});
}
subs.fetch_colors();
if (have_initial_messages) {
load_old_messages(initial_pointer, 200, 200, load_more);
} else {