From 378d648591c85415e28c03fe3f54c68b59b3ab20 Mon Sep 17 00:00:00 2001 From: Diadlo Date: Wed, 4 May 2016 02:36:19 +0300 Subject: [PATCH] refactor(contentdialog): Refactor window activate event --- src/widget/contentdialog.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/widget/contentdialog.cpp b/src/widget/contentdialog.cpp index 00f4c9d4a..0939158f2 100644 --- a/src/widget/contentdialog.cpp +++ b/src/widget/contentdialog.cpp @@ -484,18 +484,18 @@ bool ContentDialog::event(QEvent* event) updateTitle(activeChatroomWidget); Friend* frnd = activeChatroomWidget->getFriend(); + Group* group = activeChatroomWidget->getGroup(); + + GenericChatroomWidget *widget = nullptr; if (frnd) - { - frnd->getFriendWidget()->resetEventFlags(); - frnd->getFriendWidget()->updateStatusLight(); - } + widget = frnd->getFriendWidget(); else - { - Group* g = activeChatroomWidget->getGroup(); - g->getGroupWidget()->resetEventFlags(); - g->getGroupWidget()->updateStatusLight(); - } + widget = group->getGroupWidget(); + + widget->resetEventFlags(); + widget->updateStatusLight(); + Widget::getInstance()->resetIcon(); }