From 86595283a7ba922f5d31a75497a9c9943a1bd014 Mon Sep 17 00:00:00 2001 From: Thomas Ricouard Date: Mon, 17 May 2021 22:20:32 +0200 Subject: [PATCH] Fixes --- RedditOs/Features/Subreddit/SubredditViewModel.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RedditOs/Features/Subreddit/SubredditViewModel.swift b/RedditOs/Features/Subreddit/SubredditViewModel.swift index bdacb3d..8164bf1 100644 --- a/RedditOs/Features/Subreddit/SubredditViewModel.swift +++ b/RedditOs/Features/Subreddit/SubredditViewModel.swift @@ -95,7 +95,7 @@ class SubredditViewModel: ObservableObject { .map{ $0.data?.children.map{ $0.data }} .sink(receiveValue: { [weak self] results in self?.isSearchLoading = false - if self?.searchResults?.last != nil, let results = results { + if after != nil, let results = results { self?.searchResults?.append(contentsOf: results) } else { self?.searchResults = results