Add 600ms rate limit to IC signal

This commit is contained in:
in1tiate 2020-09-07 13:38:10 -05:00
parent fe5128280c
commit 311e260d65
2 changed files with 7 additions and 0 deletions

View File

@ -828,6 +828,7 @@ private slots:
void on_casing_clicked();
void ping_server();
void ratelimit_ic();
};
#endif // COURTROOM_H

View File

@ -1525,6 +1525,8 @@ void Courtroom::on_chat_return_pressed()
if ((anim_state < 3 || text_state < 2) && objection_state == 0)
return;
ui_ic_chat_message->blockSignals(true);
QTimer::singleShot(600, this, SLOT(ratelimit_ic()));
// MS#
// deskmod#
// pre-emote#
@ -4709,6 +4711,10 @@ void Courtroom::announce_case(QString title, bool def, bool pro, bool jud,
}
}
void Courtroom::ratelimit_ic() {
ui_ic_chat_message->blockSignals(false);
}
Courtroom::~Courtroom()
{
delete music_player;