Skip to content

Search results do not appear when previous search had the user select a different "page". #3836

Open
@Kamida5192

Description

@Kamida5192

Please confirm the following.

  • I checked the existing issues for duplicate problems
  • I have tried resolving the issue using the support portal
  • I have ensured my Modrinth App installation is up to date

What version of the Modrinth App are you using?

0.9.5

What operating systems are you seeing the problem on?

Windows

Describe the bug

Description

When having search results populated with multiple pages and selecting page X. Any other search result will return the X page of the search term regardless if the search term has X pages of mods. For example, if search term "A" has 120 results (6 pages of 20 results) and search term "B" has only 10 results, then page X is applied for search term "B". The user is then unable to change pages as the logic figures that search term "B" doesn't need a page switcher as it doesn't have more than 1 page. Hence, it will return a blank page.

Steps to reproduce

Steps to replicate

  1. Go to the search page for a mods and select any page. Example, I've selected page 2.

Image

  1. Now search for a mod with less than 20 entries, example "Fish"

Image

Notice how that the page selector is hidden and no mods are displayed. This is likely due to the program displaying "Page 2" even though there are no entries.

As you can see no mods appear when mods are actually there (as seen in expected behaviour).

Expected behavior

Expected Result (searching for "Fish" mods)

Image

Additional context

Solution

When searching for a new term, reset the page to 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    appRelates to Modrinth AppbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions