mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-09 17:45:03 +09:00
Add HeadsApply
This commit is contained in:
parent
0519718e51
commit
6dae561775
1 changed files with 2 additions and 0 deletions
|
@ -62,8 +62,10 @@ func (s *syncHandler) HandleHeadUpdate(ctx context.Context, statusUpdater syncst
|
|||
defer s.tree.Unlock()
|
||||
if len(contentUpdate.Changes) == 0 {
|
||||
if s.hasHeads(s.tree, contentUpdate.Heads) {
|
||||
statusUpdater.HeadsApply(peerId, update.ObjectId(), contentUpdate.Heads, true)
|
||||
return nil, nil
|
||||
}
|
||||
statusUpdater.HeadsApply(peerId, update.ObjectId(), contentUpdate.Heads, false)
|
||||
return s.syncClient.CreateFullSyncRequest(peerId, s.tree), nil
|
||||
}
|
||||
rawChangesPayload := objecttree.RawChangesPayload{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue