mirror of
https://github.com/hexedtech/codemp.git
synced 2025-03-16 11:55:31 +01:00
fix: send only delta patches via DiamondTypes
This commit is contained in:
parent
362a9689a4
commit
32255bec55
1 changed files with 2 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
use diamond_types::list::encoding::EncodeOptions;
|
use diamond_types::list::encoding::ENCODE_PATCH;
|
||||||
use diamond_types::list::{Branch, OpLog};
|
use diamond_types::list::{Branch, OpLog};
|
||||||
use diamond_types::LocalVersion;
|
use diamond_types::LocalVersion;
|
||||||
use tokio::sync::{mpsc, oneshot, watch};
|
use tokio::sync::{mpsc, oneshot, watch};
|
||||||
|
@ -192,7 +192,7 @@ impl BufferWorker {
|
||||||
|
|
||||||
if change.is_delete() || change.is_insert() {
|
if change.is_delete() || change.is_insert() {
|
||||||
tx.send(Operation {
|
tx.send(Operation {
|
||||||
data: self.oplog.encode_from(EncodeOptions::default(), &last_ver),
|
data: self.oplog.encode_from(ENCODE_PATCH, &last_ver),
|
||||||
})
|
})
|
||||||
.await
|
.await
|
||||||
.unwrap_or_warn("failed to send change!");
|
.unwrap_or_warn("failed to send change!");
|
||||||
|
|
Loading…
Add table
Reference in a new issue