handle rate limited channels

This commit is contained in:
ouwou committed 2021-04-13 04:36:27 -04:00
1 parent 140782c395
commit 422eed92fc
9 files changed
+181 -6

No files matched your search

+3 -2
View File
@@ -44,8 +44,9 @@ bool ChatInput::ProcessKeyPress(GdkEventKey *event) {
auto text = buf->get_text();
// sometimes a message thats just newlines can sneak in if you hold down enter
if (text.size() > 0 && !std::all_of(text.begin(), text.end(), [](gunichar c) -> bool { return c == gunichar('\n'); })) {
buf->set_text("");
m_signal_submit.emit(text);
const bool accepted = m_signal_submit.emit(text);
if (accepted)
buf->set_text("");
return true;
}
}