Add muted_topic style to the topics stylebar.

If you mute a topic, it will show with opacity 0.25.

(imported from commit 72517550cc9f1daa779b3aac6cacd39831d5aa20)
This commit is contained in:
Steve Howell 2013-09-30 16:03:10 -04:00
parent 45434d3f89
commit d437f6602f
4 changed files with 4 additions and 1 deletions

View File

@ -9,6 +9,7 @@ function timestamp_ms() {
var last_topic_update = 0;
exports.rerender = function () {
stream_list.update_streams_sidebar();
current_msg_list.rerender_after_muting_changes();
if (current_msg_list !== home_msg_list) {
home_msg_list.rerender_after_muting_changes();

View File

@ -203,6 +203,7 @@ function rebuild_recent_subjects(stream, active_topic) {
topic_name: topic_name,
unread: num_unread,
is_zero: num_unread === 0,
is_muted: muting.is_topic_muted(stream, topic_name),
url: narrow.by_stream_subject_uri(stream, topic_name)
};
display_subjects.push(display_subject);

View File

@ -629,6 +629,7 @@ ul.filters li.expanded_subject .topic-sidebar-arrow:hover {
color: #000;
}
ul.filters li.muted_topic,
ul.filters li.out_of_home_view {
opacity: 0.25;
}

View File

@ -1,6 +1,6 @@
<ul class='expanded_subjects' data-stream='{{stream}}'>
{{#each subjects}}
<li class='{{#if is_zero}}zero-subject-unreads {{/if}}expanded_subject' data-name='{{topic_name}}'>
<li class='{{#if is_zero}}zero-subject-unreads{{/if}} {{#if is_muted}}muted_topic{{/if}} expanded_subject' data-name='{{topic_name}}'>
<span class='subject_box'>
<a href='{{url}}' class="subject-name">
{{topic_name}}