From b3309b4bd0adc6cdadd5f7f8c4b4d6dfc63a9864 Mon Sep 17 00:00:00 2001 From: Nathan Mattes Date: Fri, 12 May 2023 22:07:37 +0200 Subject: [PATCH] Show only five accounts (IOS-157) --- .../Scene/SuggestionAccount/SuggestionAccountViewModel.swift | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Mastodon/Scene/SuggestionAccount/SuggestionAccountViewModel.swift b/Mastodon/Scene/SuggestionAccount/SuggestionAccountViewModel.swift index 393474ce5..42f18ab4c 100644 --- a/Mastodon/Scene/SuggestionAccount/SuggestionAccountViewModel.swift +++ b/Mastodon/Scene/SuggestionAccount/SuggestionAccountViewModel.swift @@ -11,7 +11,6 @@ import CoreDataStack import GameplayKit import MastodonSDK import MastodonCore -import os.log import UIKit protocol SuggestionAccountViewModelDelegate: AnyObject { @@ -53,7 +52,7 @@ final class SuggestionAccountViewModel: NSObject { var userIDs: [MastodonUser.ID] = [] do { let response = try await context.apiService.suggestionAccountV2( - query: nil, + query: .init(limit: 5), authenticationBox: authContext.mastodonAuthenticationBox ) userIDs = response.value.map { $0.account.id } @@ -64,7 +63,7 @@ final class SuggestionAccountViewModel: NSObject { ) userIDs = response.value.map { $0.id } } catch { - os_log("%{public}s[%{public}ld], %{public}s: fetch recommendAccountV2 failed. %s", (#file as NSString).lastPathComponent, #line, #function, error.localizedDescription) + } guard !userIDs.isEmpty else { return }