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();
|
auto text = disabledUsers.emplace<QTextEdit>().getElement();
|
||||||
|
|
||||||
QObject::connect(text, &QTextEdit::textChanged, this,
|
QObject::connect(text, &QTextEdit::textChanged, this, [text, app] {
|
||||||
[this] { this->disabledUsersChangedTimer.start(200); });
|
|
||||||
|
|
||||||
QObject::connect(
|
|
||||||
&this->disabledUsersChangedTimer, &QTimer::timeout, this, [text, app]() {
|
|
||||||
QStringList list = text->toPlainText().split("\n", QString::SkipEmptyParts);
|
QStringList list = text->toPlainText().split("\n", QString::SkipEmptyParts);
|
||||||
list.removeDuplicates();
|
list.removeDuplicates();
|
||||||
app->settings->highlightUserBlacklist = list.join("\n") + "\n";
|
app->settings->highlightUserBlacklist = list.join("\n") + "\n";
|
||||||
|
@ -98,9 +94,6 @@ HighlightingPage::HighlightingPage()
|
||||||
|
|
||||||
layout.append(createCheckBox(ALWAYS_PLAY, app->settings->highlightAlwaysPlaySound));
|
layout.append(createCheckBox(ALWAYS_PLAY, app->settings->highlightAlwaysPlaySound));
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---- misc
|
|
||||||
this->disabledUsersChangedTimer.setSingleShot(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace chatterino
|
} // namespace chatterino
|
||||||
|
|
|
@ -14,9 +14,6 @@ class HighlightingPage : public SettingsPage
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
HighlightingPage();
|
HighlightingPage();
|
||||||
|
|
||||||
private:
|
|
||||||
QTimer disabledUsersChangedTimer;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace chatterino
|
} // namespace chatterino
|
||||||
|
|
Loading…
Reference in a new issue