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:
parent
c7c574e2d1
commit
2eb72b1728
11 changed files with 17060 additions and 2310 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue