fix again

This commit is contained in:
Dario Rekowski on RockPI 2021-07-07 16:03:27 +00:00
parent 1dadb58086
commit f78194a767

View File

@ -341,11 +341,14 @@ class AppRequestsController extends AppController
} else { } else {
$offset = (( $page - 1 ) * $count) - 1; $offset = (( $page - 1 ) * $count) - 1;
} }
if($offset) { if($offset && $orderDirection == 'ASC') {
// move cursor one step backwards to able to load one transaction previous last which will be shown for decay calculation // move cursor one step backwards to able to load one transaction previous last which will be shown for decay calculation
$offset--; $offset--;
$limit++; $limit++;
$skip_first_transaction = true; $skip_first_transaction = true;
} else if($orderDirection == 'DESC') {
$limit++;
$skip_first_transaction = true;
} }
$stateUserTransactionsQuery = $stateUserTransactionsTable $stateUserTransactionsQuery = $stateUserTransactionsTable