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

Merge pull request #1703 from anytypeio/go-719-title-appears-when-selecting-version

GO-719: Remove legacy migration
This commit is contained in:
Sergey Malenkov 2023-01-16 15:06:38 +05:00 committed by GitHub
commit 8a5676550e
Signed by: github
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,13 +5,11 @@ import (
"fmt"
"time"
"github.com/anytypeio/go-anytype-middleware/core/relation"
"github.com/anytypeio/go-anytype-middleware/app"
"github.com/anytypeio/go-anytype-middleware/change"
"github.com/anytypeio/go-anytype-middleware/core/block"
"github.com/anytypeio/go-anytype-middleware/core/block/editor/state"
"github.com/anytypeio/go-anytype-middleware/core/block/editor/template"
"github.com/anytypeio/go-anytype-middleware/core/relation"
"github.com/anytypeio/go-anytype-middleware/pb"
"github.com/anytypeio/go-anytype-middleware/pkg/lib/bundle"
"github.com/anytypeio/go-anytype-middleware/pkg/lib/core"
@ -208,7 +206,7 @@ func (h *history) buildTree(pageId, versionId string, includeLastId bool) (tree
}
func (h *history) buildState(pageId, versionId string) (s *state.State, ver *pb.RpcHistoryVersion, err error) {
tree, sbType, err := h.buildTree(pageId, versionId, true)
tree, _, err := h.buildTree(pageId, versionId, true)
if err != nil {
return
}
@ -225,11 +223,6 @@ func (h *history) buildState(pageId, versionId string) (s *state.State, ver *pb.
if _, _, err = state.ApplyStateFast(st); err != nil {
return
}
switch sbType {
case smartblock.SmartBlockTypePage, smartblock.SmartBlockTypeProfilePage, smartblock.SmartBlockTypeSet:
// todo: set case not handled
template.InitTemplate(s, template.WithTitle)
}
s.BlocksInit(s)
if ch := tree.Get(versionId); ch != nil {
profileId, profileName, e := h.getProfileInfo()