notifications: Show notifications for rooms other than the active one
Prior to this, we would only show notifications for sessions other than the active one. The expectation should be to have notifications for any room that is not currently opened.
This commit is contained in:
parent
23ccd87258
commit
66d3e84010
1 changed files with 9 additions and 4 deletions
|
@ -116,10 +116,15 @@ impl Notifications {
|
|||
let window = app.active_window().and_downcast::<Window>();
|
||||
let session_id = session.session_id();
|
||||
|
||||
// Don't show notifications for the current session if the window is active.
|
||||
if window
|
||||
.is_some_and(|w| w.is_active() && w.current_session_id().as_deref() == Some(session_id))
|
||||
{
|
||||
// Don't show notifications for the current room in the current session if the
|
||||
// window is active.
|
||||
if window.is_some_and(|w| {
|
||||
w.is_active()
|
||||
&& w.current_session_id().as_deref() == Some(session_id)
|
||||
&& w.session_view()
|
||||
.selected_room()
|
||||
.is_some_and(|r| r.room_id() == matrix_notification.room_id)
|
||||
}) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue