This commit is contained in:
James Cole
2020-08-08 17:33:53 +02:00
parent 87c134322d
commit d4c26820fc

View File

@@ -40,30 +40,19 @@ use Log;
*/ */
class Search implements SearchInterface class Search implements SearchInterface
{ {
/** @var AccountRepositoryInterface */ private AccountRepositoryInterface $accountRepository;
private $accountRepository; private BillRepositoryInterface $billRepository;
/** @var BillRepositoryInterface */ private BudgetRepositoryInterface $budgetRepository;
private $billRepository; private CategoryRepositoryInterface $categoryRepository;
/** @var BudgetRepositoryInterface */ private Collection $modifiers;
private $budgetRepository; private string $originalQuery = '';
/** @var CategoryRepositoryInterface */ private float $startTime;
private $categoryRepository; private int $limit;
/** @var Collection */ private TagRepositoryInterface $tagRepository;
private $modifiers; private User $user;
/** @var string */ private array $validModifiers;
private $originalQuery = ''; private array $words = [];
/** @var float */ private int $page;
private $startTime;
/** @var TagRepositoryInterface */
private $tagRepository;
/** @var User */
private $user;
/** @var array */
private $validModifiers;
/** @var array */
private $words = [];
/** @var int */
private $page;
/** /**
* Search constructor. * Search constructor.
@@ -154,7 +143,9 @@ class Search implements SearchInterface
public function searchTransactions(): LengthAwarePaginator public function searchTransactions(): LengthAwarePaginator
{ {
Log::debug('Start of searchTransactions()'); Log::debug('Start of searchTransactions()');
$pageSize = (int) config('firefly.search_result_limit');
// get limit from preferences.
$pageSize = (int) app('preferences')->get('listPageSize', 50)->data;
/** @var GroupCollectorInterface $collector */ /** @var GroupCollectorInterface $collector */
$collector = app(GroupCollectorInterface::class); $collector = app(GroupCollectorInterface::class);