Big improvements in UX for tabletop actions

This commit is contained in:
ThaumRystra
2025-01-24 16:13:36 +02:00
parent 5b68190570
commit 0b499b9c98
15 changed files with 225 additions and 205 deletions

View File

@@ -2,10 +2,10 @@
// in the UI because of incompatibility with latency compensation. If the
// duplicate redraws can be fixed, this is a strictly better way of processing
// writes
export default async function bulkWrite<T>(bulkWriteOps, collection: Mongo.Collection<T>): Promise<any> {
export default async function bulkWrite<T>(bulkWriteOps, collection: Mongo.Collection<T>, forceSequential?: true): Promise<any> {
if (!bulkWriteOps.length) return;
// bulkWrite is only available on the server
if (!Meteor.isServer) {
if (!Meteor.isServer || forceSequential) {
return writePropertiesSequentially(bulkWriteOps, collection);
}
return collection.rawCollection().bulkWrite(