feat: make Nicknames searchable with settings dialog search bar (#5886)

This commit is contained in:
apa420
2025-05-10 13:58:15 +00:00
committed by GitHub
parent e86ecf5d0b
commit e793df02ba
3 changed files with 15 additions and 0 deletions
+1
View File
@@ -13,6 +13,7 @@
- Minor: Updated emojis to Unicode 16.0. (#6155)
- Minor: Allow disabling of double-click tab renaming through setting. (#6163, #6184)
- Minor: The JSON selector in the upload response can now query arrays using their indices like `foo.0`. (#6193)
- Minor: Made nicknames searchable in the Settings dialog search bar. (#5886)
- Minor: Added hotkey Action for opening account selector. (#6192)
- Bugfix: Don't create native messaging manifest file if browser directory doesn't exist. (#6116)
- Bugfix: Fixed scrolling now working on inputs in the settings. (#6128)
@@ -28,6 +28,7 @@ NicknamesPage::NicknamesPage()
(new NicknamesModel(nullptr))
->initialized(&getSettings()->nicknames))
.getElement();
this->view_ = view;
view->setTitles({"Username", "Nickname", "Enable regex", "Case-sensitive"});
view->getTableView()->horizontalHeader()->setSectionResizeMode(
@@ -49,4 +50,11 @@ NicknamesPage::NicknamesPage()
});
}
bool NicknamesPage::filterElements(const QString &query)
{
std::array fields{0, 1};
return this->view_->filterSearchResults(query, fields);
}
} // namespace chatterino
@@ -4,10 +4,16 @@
namespace chatterino {
class EditableModelView;
class NicknamesPage : public SettingsPage
{
public:
NicknamesPage();
bool filterElements(const QString &query) override;
private:
EditableModelView *view_;
};
} // namespace chatterino