mirror of
https://github.com/uowuo/abaddon.git
synced 2026-08-15 05:19:58 +00:00
handle rate limited channels
This commit is contained in:
1 parent
140782c395
commit
422eed92fc
9 files changed
+181
-6
No files matched your search
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user