feat: make Nicknames searchable with settings dialog search bar (#5886)
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
- Minor: Updated emojis to Unicode 16.0. (#6155)
|
- Minor: Updated emojis to Unicode 16.0. (#6155)
|
||||||
- Minor: Allow disabling of double-click tab renaming through setting. (#6163, #6184)
|
- 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: 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)
|
- 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: 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: Fixed scrolling now working on inputs in the settings. (#6128)
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ NicknamesPage::NicknamesPage()
|
|||||||
(new NicknamesModel(nullptr))
|
(new NicknamesModel(nullptr))
|
||||||
->initialized(&getSettings()->nicknames))
|
->initialized(&getSettings()->nicknames))
|
||||||
.getElement();
|
.getElement();
|
||||||
|
this->view_ = view;
|
||||||
|
|
||||||
view->setTitles({"Username", "Nickname", "Enable regex", "Case-sensitive"});
|
view->setTitles({"Username", "Nickname", "Enable regex", "Case-sensitive"});
|
||||||
view->getTableView()->horizontalHeader()->setSectionResizeMode(
|
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
|
} // namespace chatterino
|
||||||
|
|||||||
@@ -4,10 +4,16 @@
|
|||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
|
class EditableModelView;
|
||||||
|
|
||||||
class NicknamesPage : public SettingsPage
|
class NicknamesPage : public SettingsPage
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NicknamesPage();
|
NicknamesPage();
|
||||||
|
bool filterElements(const QString &query) override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
EditableModelView *view_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace chatterino
|
} // namespace chatterino
|
||||||
|
|||||||
Reference in New Issue
Block a user