mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Fix bug with 'disabled users' textbox
Fix 553
This commit is contained in:
parent
978931bcfc
commit
b03c39cfd7
2 changed files with 5 additions and 15 deletions
|
@ -67,11 +67,7 @@ HighlightingPage::HighlightingPage()
|
|||
{
|
||||
auto text = disabledUsers.emplace<QTextEdit>().getElement();
|
||||
|
||||
QObject::connect(text, &QTextEdit::textChanged, this,
|
||||
[this] { this->disabledUsersChangedTimer.start(200); });
|
||||
|
||||
QObject::connect(
|
||||
&this->disabledUsersChangedTimer, &QTimer::timeout, this, [text, app]() {
|
||||
QObject::connect(text, &QTextEdit::textChanged, this, [text, app] {
|
||||
QStringList list = text->toPlainText().split("\n", QString::SkipEmptyParts);
|
||||
list.removeDuplicates();
|
||||
app->settings->highlightUserBlacklist = list.join("\n") + "\n";
|
||||
|
@ -98,9 +94,6 @@ HighlightingPage::HighlightingPage()
|
|||
|
||||
layout.append(createCheckBox(ALWAYS_PLAY, app->settings->highlightAlwaysPlaySound));
|
||||
}
|
||||
|
||||
// ---- misc
|
||||
this->disabledUsersChangedTimer.setSingleShot(true);
|
||||
}
|
||||
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -14,9 +14,6 @@ class HighlightingPage : public SettingsPage
|
|||
{
|
||||
public:
|
||||
HighlightingPage();
|
||||
|
||||
private:
|
||||
QTimer disabledUsersChangedTimer;
|
||||
};
|
||||
|
||||
} // namespace chatterino
|
||||
|
|
Loading…
Reference in a new issue