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

Commit

Permalink
fix(UI): update peer label's style after setting audio playing property
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonybilinski committed Mar 25, 2019
1 parent 7f802f5 commit 4779507
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/widget/form/groupchatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,8 @@ void GroupChatForm::sendJoinLeaveMessages()
void GroupChatForm::peerAudioPlaying(ToxPk peerPk)
{
peerLabels[peerPk]->setProperty("playingAudio", LABEL_PEER_PLAYING_AUDIO);
peerLabels[peerPk]->style()->unpolish(peerLabels[peerPk]);
peerLabels[peerPk]->style()->polish(peerLabels[peerPk]);
// TODO(sudden6): check if this can ever be false, cause [] default constructs
if (!peerAudioTimers[peerPk]) {
peerAudioTimers[peerPk] = new QTimer(this);
Expand All @@ -376,6 +378,8 @@ void GroupChatForm::peerAudioPlaying(ToxPk peerPk)
auto it = peerLabels.find(peerPk);
if (it != peerLabels.end()) {
peerLabels[peerPk]->setProperty("playingAudio", LABEL_PEER_NOT_PLAYING_AUDIO);
peerLabels[peerPk]->style()->unpolish(peerLabels[peerPk]);
peerLabels[peerPk]->style()->polish(peerLabels[peerPk]);
}
delete peerAudioTimers[peerPk];
peerAudioTimers[peerPk] = nullptr;
Expand Down

0 comments on commit 4779507

Please sign in to comment.