Skip to content

Commit

Permalink
Remove unneeded check for DnD status when showing desktop talk notifi…
Browse files Browse the repository at this point in the history
…cation

The server will not deliver it anyway

Signed-off-by: Claudio Cambra <[email protected]>
  • Loading branch information
claucambra committed Nov 18, 2024
1 parent cafe626 commit 79237ac
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/gui/tray/usermodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,7 @@ void User::showDesktopTalkNotification(const Activity &activity)

const ConfigFile cfg;
const auto userStatus = _account->account()->userStatusConnector()->userStatus().state();

Check warning on line 187 in src/gui/tray/usermodel.cpp

View workflow job for this annotation

GitHub Actions / build

src/gui/tray/usermodel.cpp:187:22 [cppcoreguidelines-init-variables]

variable 'cfg' is not initialized
if (!canShowNotification(notificationId) ||
userStatus == OCC::UserStatus::OnlineStatus::DoNotDisturb ||
!cfg.showChatNotifications()) {
if (!canShowNotification(notificationId) || !cfg.showChatNotifications()) {

return;
}
Expand Down

0 comments on commit 79237ac

Please sign in to comment.