Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search only displays 10 results. #257

Closed
AgapovOne opened this issue May 25, 2024 · 2 comments
Closed

Search only displays 10 results. #257

AgapovOne opened this issue May 25, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@AgapovOne
Copy link
Contributor

AgapovOne commented May 25, 2024

Hello. Started to use search and it's only showing 10 results after applying search.

Filters view works fine and shows all the results with proper count

Screenshot

Simulator Screenshot - iPhone 15 - 2024-05-25 at 22 27 26

Easy to reproduce:

Pulse-22-27-40.patch

I just added 15 messages instead of 1 in MockStore file.

        (0..<15).forEach { _ in
            logger(named: "analytics")
                .log(level: .debug, "Will navigate to Dashboard")
        }

UPD

Tried to fix this myself. I see that the search has always cutoff = 10 and adding total results might be too slow on a lot of data. So it might be good to display that total is uknkown, but now displaying 10 results.

If that will be implemented, still button 'Show more results' doesn't load more results, so fix still required.

Load more results doesn't work because searchOperationDidFinish makes operation nil, so there is nothing to start again.

I tried to not clear operation in didFinish method, then the load more results works, but I don't know if that would break any other logic, because I don't see tests.

I can have an attempt to fix this with tests, but I want to know if I should tackle this problem or you want to fix it yourself, @kean?

@kean
Copy link
Owner

kean commented May 28, 2024

Hey, thanks for the report! I haven't had a chance to look into it yet, and PRs are always welcome.

@kean kean added the bug Something isn't working label Jun 2, 2024
@kean
Copy link
Owner

kean commented Jun 2, 2024

Fixed in v4.2.2 and it now loads more results automatically as you scroll to the bottom.

@kean kean closed this as completed Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants