feat: make filters searchable with Settings dialog search (#5890)
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
- Minor: Added WebSocket API for plugins. (#6076)
|
||||
- Minor: Allow for themes to set transparent values for window background on Linux. (#6137)
|
||||
- Minor: Popup overlay now only draws an outline when being interacted with. (#6140)
|
||||
- Minor: Made filters searchable in the Settings dialog search bar. (#5890)
|
||||
- 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)
|
||||
- Bugfix: Make reply-cancel button less coarse-grained. (#6106)
|
||||
|
||||
@@ -31,6 +31,7 @@ FiltersPage::FiltersPage()
|
||||
(new FilterModel(nullptr))
|
||||
->initialized(&getSettings()->filterRecords))
|
||||
.getElement();
|
||||
this->view_ = view;
|
||||
|
||||
view->setTitles({"Name", "Filter", "Valid"});
|
||||
view->getTableView()->horizontalHeader()->setSectionResizeMode(
|
||||
@@ -130,4 +131,11 @@ void FiltersPage::tableCellClicked(const QModelIndex &clicked,
|
||||
}
|
||||
}
|
||||
|
||||
bool FiltersPage::filterElements(const QString &query)
|
||||
{
|
||||
std::array fields{0, 1};
|
||||
|
||||
return this->view_->filterSearchResults(query, fields);
|
||||
}
|
||||
|
||||
} // namespace chatterino
|
||||
|
||||
@@ -16,11 +16,13 @@ public:
|
||||
FiltersPage();
|
||||
|
||||
void onShow() final;
|
||||
bool filterElements(const QString &query) override;
|
||||
|
||||
private:
|
||||
void tableCellClicked(const QModelIndex &clicked, EditableModelView *view);
|
||||
|
||||
QStringListModel userListModel_;
|
||||
EditableModelView *view_;
|
||||
};
|
||||
|
||||
} // namespace chatterino
|
||||
|
||||
Reference in New Issue
Block a user