mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
refactor(RD): clear up sorting methods
This refactors the sorting methods to join every bit of it into a single list, easing maintanance. It also removes the weird index contraint on the list of methods by adding an index field to the DS that holds the method. Lastly, it puts the available methods on their respective API, so other resources on the same API can re-use them later on. Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
parent
c8eca4fb85
commit
36571c5e22
17 changed files with 93 additions and 61 deletions
|
|
@ -48,13 +48,7 @@ FlameModPage::FlameModPage(ModDownloadDialog* dialog, BaseInstance& instance)
|
|||
m_model = new FlameModModel(instance);
|
||||
m_ui->packView->setModel(m_model);
|
||||
|
||||
// index is used to set the sorting with the flame api
|
||||
m_ui->sortByBox->addItem(tr("Sort by Featured"));
|
||||
m_ui->sortByBox->addItem(tr("Sort by Popularity"));
|
||||
m_ui->sortByBox->addItem(tr("Sort by Last Updated"));
|
||||
m_ui->sortByBox->addItem(tr("Sort by Name"));
|
||||
m_ui->sortByBox->addItem(tr("Sort by Author"));
|
||||
m_ui->sortByBox->addItem(tr("Sort by Downloads"));
|
||||
addSortings();
|
||||
|
||||
// sometimes Qt just ignores virtual slots and doesn't work as intended it seems,
|
||||
// so it's best not to connect them in the parent's contructor...
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue