GH-3720 Fix UI inconsistencies with Modplatforms
Fixes GH-3118 Fixes GH-3720 Fixes GH-3731 Icons and Ok button state will now switch consistently when moving between tabs. ATLaunchers packlist is now no longer redownloaded each time you open its Tab. All lists are striped now. And all search and filter fields now have a placeholder text.
This commit is contained in:
@ -72,7 +72,7 @@ int Technic::ListModel::rowCount(const QModelIndex&) const
|
||||
|
||||
void Technic::ListModel::searchWithTerm(const QString& term)
|
||||
{
|
||||
if(currentSearchTerm == term) {
|
||||
if(currentSearchTerm == term && currentSearchTerm.isNull() == term.isNull()) {
|
||||
return;
|
||||
}
|
||||
currentSearchTerm = term;
|
||||
@ -93,9 +93,18 @@ void Technic::ListModel::searchWithTerm(const QString& term)
|
||||
void Technic::ListModel::performSearch()
|
||||
{
|
||||
NetJob *netJob = new NetJob("Technic::Search");
|
||||
auto searchUrl = QString(
|
||||
"https://api.technicpack.net/search?build=multimc&q=%1"
|
||||
).arg(currentSearchTerm);
|
||||
QString searchUrl = "";
|
||||
if (currentSearchTerm.isEmpty()) {
|
||||
searchUrl = QString(
|
||||
"https://api.technicpack.net/trending?build=multimc"
|
||||
).arg(currentSearchTerm);
|
||||
}
|
||||
else
|
||||
{
|
||||
searchUrl = QString(
|
||||
"https://api.technicpack.net/search?build=multimc&q=%1"
|
||||
).arg(currentSearchTerm);
|
||||
}
|
||||
netJob->addNetAction(Net::Download::makeByteArray(QUrl(searchUrl), &response));
|
||||
jobPtr = netJob;
|
||||
jobPtr->start();
|
||||
|
Reference in New Issue
Block a user