mirror of
https://github.com/anyproto/anytype-heart.git
synced 2025-06-09 09:35:00 +09:00
GO-2166: Fix space creation
This commit is contained in:
parent
bb52b48715
commit
35db541479
10 changed files with 90 additions and 91 deletions
|
@ -9,12 +9,12 @@ import (
|
|||
"github.com/anyproto/anytype-heart/space/spaceinfo"
|
||||
)
|
||||
|
||||
func (s *service) startLoad(ctx context.Context, spaceID string) (err error) {
|
||||
func (s *service) startLoad(ctx context.Context, spaceID string, justCreated bool) (err error) {
|
||||
s.mu.Lock()
|
||||
defer s.mu.Unlock()
|
||||
|
||||
status := s.getStatus(spaceID)
|
||||
|
||||
// Do nothing if space is already loading
|
||||
if status.LocalStatus != spaceinfo.LocalStatusUnknown {
|
||||
return nil
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ func (s *service) startLoad(ctx context.Context, spaceID string) (err error) {
|
|||
if err = s.setStatus(ctx, info); err != nil {
|
||||
return
|
||||
}
|
||||
s.loading[spaceID] = newLoadingSpace(s.ctx, spaceID, s)
|
||||
s.loading[spaceID] = s.newLoadingSpace(s.ctx, spaceID, justCreated)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue