fix sync
This commit is contained in:
@@ -335,6 +335,22 @@ class PbSyncService {
|
||||
);
|
||||
}
|
||||
|
||||
/// Cheap remote count for stale detection (1 row, with totals).
|
||||
Future<int> countTransactions() async {
|
||||
final userId = _userId;
|
||||
final filter = 'user="$userId"';
|
||||
final result = await _withTimeout(
|
||||
_pb.collection('transactions').getList(
|
||||
page: 1,
|
||||
perPage: 1,
|
||||
filter: filter,
|
||||
skipTotal: false,
|
||||
),
|
||||
label: 'transactions count',
|
||||
);
|
||||
return result.totalItems;
|
||||
}
|
||||
|
||||
/// Pulls the full bank transaction list for the signed-in user.
|
||||
Future<List<BankTransaction>> pullTransactions({
|
||||
void Function(double progress)? onProgress,
|
||||
|
||||
Reference in New Issue
Block a user