aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/pages/modplatform/modrinth
diff options
context:
space:
mode:
authorRedsonBr140 <redson@riseup.net>2022-11-14 21:09:37 -0300
committerGitHub <noreply@github.com>2022-11-14 21:09:37 -0300
commit1e4ee02cbc0f44f390b33b5b85418f4eadffbae4 (patch)
tree6191253cc260c8ee6a5030d4b73f3cbed642d973 /launcher/ui/pages/modplatform/modrinth
parentbe765f8d883697d2284343f9ee6c858987622857 (diff)
parentcedc7754d96e4c53d50bcce2b2a0f139b840f3d0 (diff)
downloadPrismLauncher-1e4ee02cbc0f44f390b33b5b85418f4eadffbae4.tar.gz
PrismLauncher-1e4ee02cbc0f44f390b33b5b85418f4eadffbae4.tar.bz2
PrismLauncher-1e4ee02cbc0f44f390b33b5b85418f4eadffbae4.zip
Merge branch 'PrismLauncher:develop' into menu-themes
Diffstat (limited to 'launcher/ui/pages/modplatform/modrinth')
-rw-r--r--launcher/ui/pages/modplatform/modrinth/ModrinthModel.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/launcher/ui/pages/modplatform/modrinth/ModrinthModel.h b/launcher/ui/pages/modplatform/modrinth/ModrinthModel.h
index 6f33e11e..3be377a1 100644
--- a/launcher/ui/pages/modplatform/modrinth/ModrinthModel.h
+++ b/launcher/ui/pages/modplatform/modrinth/ModrinthModel.h
@@ -55,8 +55,8 @@ class ModpackListModel : public QAbstractListModel {
ModpackListModel(ModrinthPage* parent);
~ModpackListModel() override = default;
- inline auto rowCount(const QModelIndex& parent) const -> int override { return modpacks.size(); };
- inline auto columnCount(const QModelIndex& parent) const -> int override { return 1; };
+ inline auto rowCount(const QModelIndex& parent) const -> int override { return parent.isValid() ? 0 : modpacks.size(); };
+ inline auto columnCount(const QModelIndex& parent) const -> int override { return parent.isValid() ? 0 : 1; };
inline auto flags(const QModelIndex& index) const -> Qt::ItemFlags override { return QAbstractListModel::flags(index); };
auto debugName() const -> QString;
@@ -74,7 +74,7 @@ class ModpackListModel : public QAbstractListModel {
void getLogo(const QString& logo, const QString& logoUrl, LogoCallback callback);
- inline auto canFetchMore(const QModelIndex& parent) const -> bool override { return searchState == CanPossiblyFetchMore; };
+ inline auto canFetchMore(const QModelIndex& parent) const -> bool override { return parent.isValid() ? false : searchState == CanPossiblyFetchMore; };
public slots:
void searchRequestFinished(QJsonDocument& doc_all);