This commit is contained in:
davmar
2026-09-10 11:40:28 +02:00
parent 68623b38ff
commit aec89ac41d
5 changed files with 127 additions and 7 deletions
+16
View File
@@ -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,