compose_banner: Don't show banner if message sent in a near view.

Earlier, when a user was in /near/ topic or dm view, on sending
message in the same conversation we were incorrectly displaying
the 'jump to sent message' banner.

This commit fixes the incorrect behavior.

Fixes #30341.
This commit is contained in:
Prakhar Pratyush
2024-06-08 08:17:44 +05:30
committed by Tim Abbott
parent bb4d62ffa6
commit 0c13422c0d

View File

@@ -125,8 +125,13 @@ export function is_local_mix(message: Message): boolean {
}
const current_filter = narrow_state.filter();
const is_conversation_view =
current_filter === undefined
? false
: current_filter.is_conversation_view() ||
current_filter.is_conversation_view_with_near();
const $row = message_lists.current.get_row(message.id);
if (current_filter && current_filter.is_conversation_view() && $row.length > 0) {
if (is_conversation_view && $row.length > 0) {
// If our message is in the current conversation view, we do
// not have a mix, so we are happy.
return false;