Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
fix(widget, contentdialog): Added reset icon after activate chat window
Browse files Browse the repository at this point in the history
Fix #3139.
  • Loading branch information
Diadlo committed Apr 23, 2016
1 parent f2b8b10 commit 4edc599
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/widget/contentdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@ bool ContentDialog::event(QEvent* event)
g->getGroupWidget()->resetEventFlags();
g->getGroupWidget()->updateStatusLight();
}
Widget::getInstance()->resetIcon();
}

currentDialog = this;
Expand Down
12 changes: 7 additions & 5 deletions src/widget/widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1670,6 +1670,12 @@ void Widget::onEmptyGroupCreated(int groupId)
group->getGroupWidget()->editName();
}

void Widget::resetIcon() {
eventIcon = false;
eventFlag = false;
updateIcons();
}

bool Widget::event(QEvent * e)
{
switch (e->type())
Expand All @@ -1687,11 +1693,7 @@ bool Widget::event(QEvent * e)
}

if (eventFlag)
{
eventFlag = false;
eventIcon = false;
updateIcons();
}
resetIcon();

focusChatInput();

Expand Down
3 changes: 3 additions & 0 deletions src/widget/widget.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ class Widget final : public QMainWindow
void searchItem(GenericChatItemWidget* chatItem, GenericChatItemWidget::ItemType type);
bool groupsVisible() const;

// Used to reset the blinking icon
void resetIcon();

public slots:
void onSettingsClicked();
void onSeparateWindowClicked(bool separate);
Expand Down

0 comments on commit 4edc599

Please sign in to comment.