1
0
Fork 0
mirror of https://github.com/anyproto/anytype-heart.git synced 2025-06-09 09:35:00 +09:00

GO-803: fix account creation

Signed-off-by: AnastasiaShemyakinskaya <shem98a@mail.ru>
This commit is contained in:
AnastasiaShemyakinskaya 2023-04-25 18:17:59 +02:00 committed by Mikhail Iudin
parent c7c574e2d1
commit 2eb72b1728
No known key found for this signature in database
GPG key ID: FAAAA8BAABDFF1C0
11 changed files with 17060 additions and 2310 deletions

View file

@ -68,14 +68,14 @@ type builtinObjects struct {
service *block.Service
relService relation2.Service
newAccount bool
idsMap map[string]string
createBuiltinObjects bool
idsMap map[string]string
}
func (b *builtinObjects) Init(a *app.App) (err error) {
b.source = a.MustComponent(source.CName).(source.Service)
b.service = a.MustComponent(block.CName).(*block.Service)
b.newAccount = a.MustComponent(config.CName).(*config.Config).NewAccount
b.createBuiltinObjects = a.MustComponent(config.CName).(*config.Config).CreateBuiltinObjects
b.relService = a.MustComponent(relation2.CName).(relation2.Service)
b.cancel = func() {}
return
@ -86,7 +86,7 @@ func (b *builtinObjects) Name() (name string) {
}
func (b *builtinObjects) Run(context.Context) (err error) {
if !b.newAccount {
if !b.createBuiltinObjects {
// import only for new accounts
return
}