1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-10 01:51:11 +09:00

Merge pull request #78 from anyproto/GO-1918-any-sync-deletion-updates

GO-1918: any sync deletion updates
This commit is contained in:
Mikhail Rakhmanov 2023-08-23 17:12:36 +02:00 committed by GitHub
commit 1b903118c6
Signed by: github
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 920 additions and 231 deletions

View file

@ -2,11 +2,9 @@ package settings
import (
"context"
"github.com/anyproto/any-sync/commonspace/deletionmanager"
"sync/atomic"
"github.com/anyproto/any-sync/accountservice"
"github.com/anyproto/any-sync/app"
"github.com/anyproto/any-sync/commonspace/deletionmanager"
"github.com/anyproto/any-sync/commonspace/object/tree/objecttree"
"github.com/anyproto/any-sync/commonspace/object/tree/synctree"
"github.com/anyproto/any-sync/commonspace/object/tree/synctree/updatelistener"
@ -30,11 +28,10 @@ func New() Settings {
}
type settings struct {
account accountservice.Service
storage spacestorage.SpaceStorage
configuration nodeconf.NodeConf
treeBuilder objecttreebuilder.TreeBuilderComponent
spaceIsDeleted *atomic.Bool
account accountservice.Service
storage spacestorage.SpaceStorage
configuration nodeconf.NodeConf
treeBuilder objecttreebuilder.TreeBuilderComponent
settingsObject SettingsObject
}
@ -45,7 +42,6 @@ func (s *settings) Init(a *app.App) (err error) {
s.treeBuilder = a.MustComponent(objecttreebuilder.CName).(objecttreebuilder.TreeBuilderComponent)
sharedState := a.MustComponent(spacestate.CName).(*spacestate.SpaceState)
s.storage = a.MustComponent(spacestorage.CName).(spacestorage.SpaceStorage)
s.spaceIsDeleted = sharedState.SpaceIsDeleted
deps := Deps{
BuildFunc: func(ctx context.Context, id string, listener updatelistener.UpdateListener) (t synctree.SyncTree, err error) {