… | |
… | |
113 | #$nb->set_current_page ($cv); |
113 | #$nb->set_current_page ($cv); |
114 | } |
114 | } |
115 | |
115 | |
116 | sub touch_channel { |
116 | sub touch_channel { |
117 | my ($self, $id) = @_; |
117 | my ($self, $id) = @_; |
118 | if (my $cv = $self->{chatviews}->{$id}) { |
118 | if (not exists $self->{chatviews}->{$id}) { |
119 | if ($cv != $self->{nb}->get_current_page) { |
|
|
120 | $self->highlight_channel ($id); |
|
|
121 | } |
|
|
122 | } else { |
|
|
123 | $self->add_chat ($id); |
119 | $self->add_chat ($id); |
124 | } |
120 | } |
125 | } |
121 | } |
126 | |
122 | |
127 | sub highlight_channel { |
123 | sub highlight_channel { |
… | |
… | |
181 | my ($self, $para) = @_; |
177 | my ($self, $para) = @_; |
182 | my $id = $para->{type}; |
178 | my $id = $para->{type}; |
183 | |
179 | |
184 | if (exists $self->{channel_info}->{$id}) { |
180 | if (exists $self->{channel_info}->{$id}) { |
185 | $self->touch_channel ($id); |
181 | $self->touch_channel ($id); |
|
|
182 | if (my $cv = $self->{chatviews}->{$id}) { |
|
|
183 | if ($cv != $self->{nb}->get_current_page) { |
|
|
184 | $self->highlight_channel ($id); |
|
|
185 | } |
|
|
186 | } |
186 | $self->{chatviews}->{$id}->message ($para); |
187 | $self->{chatviews}->{$id}->message ($para); |
187 | } else { |
188 | } else { |
188 | $self->{main_log}->message ($para); |
189 | $self->{main_log}->message ($para); |
189 | } |
190 | } |
190 | } |
191 | } |