Skip to content

Commit

Permalink
message_view_header: Fix misleading variable name.
Browse files Browse the repository at this point in the history
It never contained only icon data.
  • Loading branch information
timabbott committed May 14, 2024
1 parent 941c5da commit 4bf8c19
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions web/src/message_view_header.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function get_message_view_header_context(filter: Filter | undefined): MessageVie
const description = filter.get_description()?.description;
const link = filter.get_description()?.link;
assert(title !== undefined);
const icon_data = filter.add_icon_data({
const context = filter.add_icon_data({
title,
description,
link,
Expand All @@ -93,7 +93,7 @@ function get_message_view_header_context(filter: Filter | undefined): MessageVie

if (filter.has_operator("channel") && !filter._sub) {
return {
...icon_data,
...context,
sub_count: "0",
formatted_sub_count: "0",
rendered_narrow_description: $t({
Expand All @@ -109,7 +109,7 @@ function get_message_view_header_context(filter: Filter | undefined): MessageVie
const current_stream = filter._sub;
const sub_count = peer_data.get_subscriber_count(current_stream.stream_id);
return {
...icon_data,
...context,
is_admin: current_user.is_admin,
rendered_narrow_description: current_stream.rendered_description,
sub_count,
Expand All @@ -118,7 +118,7 @@ function get_message_view_header_context(filter: Filter | undefined): MessageVie
};
}

return icon_data;
return context;
}

export function colorize_message_view_header(): void {
Expand Down

0 comments on commit 4bf8c19

Please sign in to comment.