* Push the operation into the send queue, SyncEngine will ensure that the data is sent to the server in version order * And provide temporary local persistence capabilities to prevent users from losing data * in the case of accidental network disconnection and active refresh
(operation: IOperation)
| 92 | * in the case of accidental network disconnection and active refresh |
| 93 | */ |
| 94 | pushOpBuffer(operation: IOperation) { |
| 95 | const _actions = this.viewPropertyFilter ? |
| 96 | this.viewPropertyFilter.parseActions(operation.actions, { commandName: operation.cmd as CollaCommandName }) : |
| 97 | operation.actions; |
| 98 | if (_actions.length) { |
| 99 | this.bufferStorage.pushOpBuffer({ |
| 100 | ...operation, |
| 101 | actions: _actions, |
| 102 | revision: this.getRevision(), |
| 103 | resourceType: this.resourceType |
| 104 | }); |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | /** |
| 109 | * Whether there is still unsent data |
no test coverage detected