mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
inbox_ui: Minor refactor.
Use `inbox-folder` class to check if the row is an inbox folder.
This commit is contained in:
@@ -1434,11 +1434,11 @@ export function get_focused_row_message(): {message?: Message | undefined} & (
|
|||||||
return {message: undefined, msg_type: "private"};
|
return {message: undefined, msg_type: "private"};
|
||||||
}
|
}
|
||||||
|
|
||||||
const stream_id = Number($focused_row.attr("data-stream-id"));
|
if ($focused_row.hasClass("inbox-folder")) {
|
||||||
if (Number.isNaN(stream_id)) {
|
|
||||||
// This is a channel folder header.
|
// This is a channel folder header.
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
const stream_id = Number($focused_row.attr("data-stream-id"));
|
||||||
compose_state.set_compose_recipient_id(stream_id);
|
compose_state.set_compose_recipient_id(stream_id);
|
||||||
return {message: undefined, msg_type: "stream", stream_id};
|
return {message: undefined, msg_type: "stream", stream_id};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user