Skip to content

Commit 64e9236

Browse files
committed
refactor(push-notification): enhance _sendBatch function with additional parameters
- Add batchNumber and totalBatches parameters to _sendBatch function - Update batch sending logic to use new parameters - Improve tracking and monitoring of batch processing
1 parent f9f11e2 commit 64e9236

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/src/services/firebase_push_notification_client.dart

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,12 @@ class FirebasePushNotificationClient implements IPushNotificationClient {
6666
);
6767

6868
// Send each chunk as a separate batch request.
69-
await _sendBatch(deviceTokens: batch, payload: payload);
69+
await _sendBatch(
70+
batchNumber: (i ~/ batchSize) + 1,
71+
totalBatches: (deviceTokens.length / batchSize).ceil(),
72+
deviceTokens: batch,
73+
payload: payload,
74+
);
7075
}
7176
}
7277

0 commit comments

Comments
 (0)