mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
filter: Standardize type of has_topic's stream_id.
This commit is contained in:
@@ -1626,10 +1626,8 @@ export class Filter {
|
||||
return new Filter(terms);
|
||||
}
|
||||
|
||||
has_topic(stream_id: number, topic: string): boolean {
|
||||
return (
|
||||
this.has_operand("channel", stream_id.toString()) && this.has_operand("topic", topic)
|
||||
);
|
||||
has_topic(stream_id: string, topic: string): boolean {
|
||||
return this.has_operand("channel", stream_id) && this.has_operand("topic", topic);
|
||||
}
|
||||
|
||||
sorted_term_types(): string[] {
|
||||
|
@@ -679,7 +679,7 @@ export function update_messages(events: UpdateMessageEvent[]): void {
|
||||
// Code further down takes care of the actual rerendering of
|
||||
// messages within a narrow.
|
||||
selection_changed_topic &&
|
||||
current_filter?.has_topic(old_stream_id, orig_topic)
|
||||
current_filter?.has_topic(String(old_stream_id), orig_topic)
|
||||
) {
|
||||
let new_filter = current_filter;
|
||||
if (new_filter && stream_changed) {
|
||||
|
Reference in New Issue
Block a user