1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-08 05:57:03 +09:00

Fix add text bug

This commit is contained in:
mcrakhman 2022-10-20 19:08:43 +02:00 committed by Mikhail Iudin
parent f213ec7efe
commit 40d5d832fb
No known key found for this signature in database
GPG key ID: FAAAA8BAABDFF1C0
2 changed files with 7 additions and 2 deletions

View file

@ -40,16 +40,18 @@ func CreateTextDocument(
return &textDocument{
objTree: t,
account: account,
}, nil
}
func NewTextDocument(ctx context.Context, space commonspace.Space, id string, listener updatelistener.UpdateListener) (doc TextDocument, err error) {
func NewTextDocument(ctx context.Context, space commonspace.Space, id string, listener updatelistener.UpdateListener, account account.Service) (doc TextDocument, err error) {
t, err := space.BuildTree(ctx, id, listener)
if err != nil {
return
}
return &textDocument{
objTree: t,
account: account,
}, nil
}