Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS-2654 DI | Home | migrate bottom panel #1187

Merged
merged 1 commit into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions Anytype.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,6 @@
2A4E3F832BC7C7AC00724DBF /* BinConfirmationAlert.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A4E3F822BC7C7AC00724DBF /* BinConfirmationAlert.swift */; };
2A4E3F862BC7C81200724DBF /* BinConfirmationAlertModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A4E3F852BC7C81200724DBF /* BinConfirmationAlertModel.swift */; };
2A4E5C8A296C0BAD002BB71B /* HomeBottomPanelView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A4E5C89296C0BAD002BB71B /* HomeBottomPanelView.swift */; };
2A4E5C8D296C0BFF002BB71B /* HomeBottomPanelViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A4E5C8C296C0BFF002BB71B /* HomeBottomPanelViewModel.swift */; };
2A4E99E82B0B5DB700C81584 /* SetObjectCreationCoordinatorOutput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A4E99E72B0B5DB700C81584 /* SetObjectCreationCoordinatorOutput.swift */; };
2A4FFBC1289D1C7E004938DF /* Logger in Frameworks */ = {isa = PBXBuildFile; productRef = 2A4FFBC0289D1C7E004938DF /* Logger */; };
2A4FFBC2289D1C7E004938DF /* Logger in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 2A4FFBC0289D1C7E004938DF /* Logger */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
Expand Down Expand Up @@ -759,7 +758,6 @@
2AD5EFC62B17492500FAA908 /* BottomAlertButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2AD5EFC52B17492500FAA908 /* BottomAlertButtonView.swift */; };
2AD5EFC92B1753E400FAA908 /* DocumentUpdateAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2AD5EFC82B1753E400FAA908 /* DocumentUpdateAlertView.swift */; };
2AD5EFCB2B17559D00FAA908 /* DocumentCommonOpenErrorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2AD5EFCA2B17559D00FAA908 /* DocumentCommonOpenErrorView.swift */; };
2AD6792C29812EE600339624 /* HomeBottomPanelModuleOutput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2AD6792B29812EE600339624 /* HomeBottomPanelModuleOutput.swift */; };
2AD741292993DB27004BD223 /* BinLinkWidgetViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2AD741242993DB27004BD223 /* BinLinkWidgetViewModel.swift */; };
2AD7412C2993E1C9004BD223 /* HomeWidgetCommonProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2AD7412B2993E1C9004BD223 /* HomeWidgetCommonProvider.swift */; };
2AD7412E2993E1EF004BD223 /* HomeWidgetCommonProviderAssembly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2AD7412D2993E1EF004BD223 /* HomeWidgetCommonProviderAssembly.swift */; };
Expand Down Expand Up @@ -841,9 +839,6 @@
2AF4C3DE295D82A700FD7153 /* WidgetsSubmoduleDI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2AF4C3DD295D82A700FD7153 /* WidgetsSubmoduleDI.swift */; };
2AF4C3E0295D837C00FD7153 /* ObjectTreeWidgetModuleAssembly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2AF4C3DF295D837C00FD7153 /* ObjectTreeWidgetModuleAssembly.swift */; };
2AF605A128F417210078213D /* EditorBottomNavigationManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2AF605A028F417210078213D /* EditorBottomNavigationManager.swift */; };
2AFA110A296C44BF0055422F /* HomeBottomPanelModuleAssembly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2AFA1109296C44BF0055422F /* HomeBottomPanelModuleAssembly.swift */; };
2AFA110E296C672A0055422F /* HomeBottomPanelProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2AFA110D296C672A0055422F /* HomeBottomPanelProvider.swift */; };
2AFA1110296C67B50055422F /* HomeBottomPanelProviderAssembly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2AFA110F296C67B50055422F /* HomeBottomPanelProviderAssembly.swift */; };
2AFA1113296DBBD60055422F /* ObjectsCommonSubscriptionDataBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2AFA1112296DBBD60055422F /* ObjectsCommonSubscriptionDataBuilder.swift */; };
2AFB541D28621776004F7458 /* Strings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2AFB541C28621776004F7458 /* Strings.swift */; };
2AFB542328634FC5004F7458 /* Localizable.stringsdict in Resources */ = {isa = PBXBuildFile; fileRef = 2AFB542128634FC5004F7458 /* Localizable.stringsdict */; };
Expand Down Expand Up @@ -2200,7 +2195,6 @@
2A4E3F822BC7C7AC00724DBF /* BinConfirmationAlert.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BinConfirmationAlert.swift; sourceTree = "<group>"; };
2A4E3F852BC7C81200724DBF /* BinConfirmationAlertModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BinConfirmationAlertModel.swift; sourceTree = "<group>"; };
2A4E5C89296C0BAD002BB71B /* HomeBottomPanelView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeBottomPanelView.swift; sourceTree = "<group>"; };
2A4E5C8C296C0BFF002BB71B /* HomeBottomPanelViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeBottomPanelViewModel.swift; sourceTree = "<group>"; };
2A4E99E72B0B5DB700C81584 /* SetObjectCreationCoordinatorOutput.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SetObjectCreationCoordinatorOutput.swift; sourceTree = "<group>"; };
2A4FFBBF289D1C61004938DF /* Logger */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = Logger; path = Modules/Logger; sourceTree = "<group>"; };
2A4FFBC3289D4B55004938DF /* InvocationMesagesHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InvocationMesagesHandler.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2533,7 +2527,6 @@
2AD5EFC52B17492500FAA908 /* BottomAlertButtonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BottomAlertButtonView.swift; sourceTree = "<group>"; };
2AD5EFC82B1753E400FAA908 /* DocumentUpdateAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DocumentUpdateAlertView.swift; sourceTree = "<group>"; };
2AD5EFCA2B17559D00FAA908 /* DocumentCommonOpenErrorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DocumentCommonOpenErrorView.swift; sourceTree = "<group>"; };
2AD6792B29812EE600339624 /* HomeBottomPanelModuleOutput.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeBottomPanelModuleOutput.swift; sourceTree = "<group>"; };
2AD741242993DB27004BD223 /* BinLinkWidgetViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BinLinkWidgetViewModel.swift; sourceTree = "<group>"; };
2AD7412B2993E1C9004BD223 /* HomeWidgetCommonProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeWidgetCommonProvider.swift; sourceTree = "<group>"; };
2AD7412D2993E1EF004BD223 /* HomeWidgetCommonProviderAssembly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeWidgetCommonProviderAssembly.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2615,9 +2608,6 @@
2AF4C3DD295D82A700FD7153 /* WidgetsSubmoduleDI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WidgetsSubmoduleDI.swift; sourceTree = "<group>"; };
2AF4C3DF295D837C00FD7153 /* ObjectTreeWidgetModuleAssembly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ObjectTreeWidgetModuleAssembly.swift; sourceTree = "<group>"; };
2AF605A028F417210078213D /* EditorBottomNavigationManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EditorBottomNavigationManager.swift; sourceTree = "<group>"; };
2AFA1109296C44BF0055422F /* HomeBottomPanelModuleAssembly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeBottomPanelModuleAssembly.swift; sourceTree = "<group>"; };
2AFA110D296C672A0055422F /* HomeBottomPanelProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeBottomPanelProvider.swift; sourceTree = "<group>"; };
2AFA110F296C67B50055422F /* HomeBottomPanelProviderAssembly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeBottomPanelProviderAssembly.swift; sourceTree = "<group>"; };
2AFA1112296DBBD60055422F /* ObjectsCommonSubscriptionDataBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ObjectsCommonSubscriptionDataBuilder.swift; sourceTree = "<group>"; };
2AFB541C28621776004F7458 /* Strings.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Strings.swift; sourceTree = "<group>"; };
2AFB542228634FC5004F7458 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = en; path = en.lproj/Localizable.stringsdict; sourceTree = "<group>"; };
Expand Down Expand Up @@ -5688,11 +5678,7 @@
2A4E5C8B296C0BEF002BB71B /* HomeBottomPanel */ = {
isa = PBXGroup;
children = (
2AFA110C296C67090055422F /* Provider */,
2AFA1109296C44BF0055422F /* HomeBottomPanelModuleAssembly.swift */,
2A4E5C89296C0BAD002BB71B /* HomeBottomPanelView.swift */,
2A4E5C8C296C0BFF002BB71B /* HomeBottomPanelViewModel.swift */,
2AD6792B29812EE600339624 /* HomeBottomPanelModuleOutput.swift */,
);
path = HomeBottomPanel;
sourceTree = "<group>";
Expand Down Expand Up @@ -7008,15 +6994,6 @@
path = CreateWidgetFlow;
sourceTree = "<group>";
};
2AFA110C296C67090055422F /* Provider */ = {
isa = PBXGroup;
children = (
2AFA110D296C672A0055422F /* HomeBottomPanelProvider.swift */,
2AFA110F296C67B50055422F /* HomeBottomPanelProviderAssembly.swift */,
);
path = Provider;
sourceTree = "<group>";
};
2AFD7E162B626C1E003B16EB /* GlobalEnv */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -10648,7 +10625,6 @@
3D829172265E50190007C152 /* RedactedText.swift in Sources */,
2AD1FCC12AB8466C00CEBE1E /* SetBottomPanelHidenEnvironment.swift in Sources */,
C9EF85172938E6A50001E6EC /* TappableLabel.swift in Sources */,
2AFA1110296C67B50055422F /* HomeBottomPanelProviderAssembly.swift in Sources */,
2EC9426E2901946800DE91E4 /* SetKanbanColumn.swift in Sources */,
123FDACE26C1361B00F6F44B /* ObjectHeader.swift in Sources */,
12C8440926FCECA300D64B8D /* ObjectHeaderFilledContentView.swift in Sources */,
Expand Down Expand Up @@ -11083,7 +11059,6 @@
2AA4C26F2A70287100C2EC66 /* WorkspacesSubscriptionBuilder.swift in Sources */,
2A7466AA2A9DFDF400D73F63 /* ObjectSettingsCoordinatorOutput.swift in Sources */,
EA20CDCD2612288400DBA9FE /* VideoBlockViewModel.swift in Sources */,
2AD6792C29812EE600339624 /* HomeBottomPanelModuleOutput.swift in Sources */,
2E7E50422B6D5C3A003867A3 /* ObjectRelationListModuleOutput.swift in Sources */,
3D1CEC4527F5F566000D36BA /* Clock.swift in Sources */,
2A30B2022BB40E3400206806 /* BlockFields+Fields.swift in Sources */,
Expand Down Expand Up @@ -11253,7 +11228,6 @@
3DA626532657ADA700942249 /* PopupExtension.swift in Sources */,
3D00F1CF278D7CB700863D7C /* ObjectSearchData.swift in Sources */,
2A64B6BB2B3DD54D000316E2 /* ObjectActionsServiceError+Localization.swift in Sources */,
2A4E5C8D296C0BFF002BB71B /* HomeBottomPanelViewModel.swift in Sources */,
2A66937D2A7104EA007747DD /* ObjectIconImageGuidelineSet.swift in Sources */,
3D44984D26D54A64005A3E06 /* BindableGestureRecognizer.swift in Sources */,
2A176C482BA9A52300F5036D /* ParticipantRemoveNotificationView.swift in Sources */,
Expand Down Expand Up @@ -11325,7 +11299,6 @@
2A03039F28ABD4BD002EFC46 /* SystemURLService.swift in Sources */,
2AC906DF29B6289A00209E39 /* RecentListWidgetModuleAssembly.swift in Sources */,
2E2D256128880C8D00E3DFD1 /* SetFiltersSelectionViewState.swift in Sources */,
2AFA110E296C672A0055422F /* HomeBottomPanelProvider.swift in Sources */,
2E2A23022A9E46B100745D78 /* SetLayoutSettingsCoordinatorAssembly.swift in Sources */,
2AF4C3DE295D82A700FD7153 /* WidgetsSubmoduleDI.swift in Sources */,
2E1146D2293125610057C753 /* SetKanbanColumnSettingsView.swift in Sources */,
Expand Down Expand Up @@ -11768,7 +11741,6 @@
2A4919A929530B0F00FCEAC9 /* HomeSubmoduleProviderProtocol.swift in Sources */,
2A9486582950A494007A5586 /* HomeWidgetsViewModel.swift in Sources */,
12DE4060264AE455007B5074 /* LayoutAnchorType.swift in Sources */,
2AFA110A296C44BF0055422F /* HomeBottomPanelModuleAssembly.swift in Sources */,
3D24912B27BD271900821595 /* MentionMarkupEventProvider.swift in Sources */,
2E2A23042A9F746D00745D78 /* SetLayoutSettings.swift in Sources */,
3DB1CA5A272BEF3B000D2779 /* WallpaperPickerView.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ protocol WidgetsSubmoduleDIProtocol {
func collectionsCompactListWidgetModuleAssembly() -> HomeWidgetCommonAssemblyProtocol
// MARK: - Link
func linkWidgetModuleAssembly() -> HomeWidgetCommonAssemblyProtocol
// MARK: - Bottom
func bottomPanelProviderAssembly(output: HomeBottomPanelModuleOutput?) -> HomeBottomPanelProviderAssemblyProtocol
func bottomPanelModuleAssembly() -> HomeBottomPanelModuleAssemblyProtocol
}

final class WidgetsSubmoduleDI: WidgetsSubmoduleDIProtocol {
Expand Down Expand Up @@ -205,14 +202,4 @@ final class WidgetsSubmoduleDI: WidgetsSubmoduleDIProtocol {
func linkWidgetModuleAssembly() -> HomeWidgetCommonAssemblyProtocol {
return LinkWidgetModuleAssembly(serviceLocator: serviceLocator, uiHelpersDI: uiHelpersDI)
}

// MARK: - Bottom

func bottomPanelProviderAssembly(output: HomeBottomPanelModuleOutput?) -> HomeBottomPanelProviderAssemblyProtocol {
return HomeBottomPanelProviderAssembly(widgetsSubmoduleDI: self, output: output)
}

func bottomPanelModuleAssembly() -> HomeBottomPanelModuleAssemblyProtocol {
return HomeBottomPanelModuleAssembly(serviceLocator: serviceLocator, uiHelpersDI: uiHelpersDI)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import DeepLinks
@MainActor
final class HomeCoordinatorViewModel: ObservableObject,
HomeWidgetsModuleOutput, CommonWidgetModuleOutput,
HomeBottomPanelModuleOutput, HomeBottomNavigationPanelModuleOutput,
HomeBottomNavigationPanelModuleOutput,
SetObjectCreationCoordinatorOutput {

// MARK: - DI
Expand Down Expand Up @@ -143,7 +143,7 @@ final class HomeCoordinatorViewModel: ObservableObject,
}

func homeWidgetsModule(info: AccountInfo) -> AnyView? {
return homeWidgetsModuleAssembly.make(info: info, output: self, widgetOutput: self, bottomPanelOutput: self)
return homeWidgetsModuleAssembly.make(info: info, output: self, widgetOutput: self)
}

func homeBottomNavigationPanelModule(info: AccountInfo) -> AnyView {
Expand Down Expand Up @@ -171,6 +171,14 @@ final class HomeCoordinatorViewModel: ObservableObject,

// MARK: - HomeWidgetsModuleOutput

func onCreateWidgetSelected(context: AnalyticsWidgetContext) {
showCreateWidgetData = CreateWidgetCoordinatorModel(
widgetObjectId: activeWorkspaceStorage.workspaceInfo.widgetsId,
position: .end,
context: context
)
}

// MARK: - CommonWidgetModuleOutput

func onObjectSelected(screenData: EditorScreenData) {
Expand Down Expand Up @@ -221,16 +229,6 @@ final class HomeCoordinatorViewModel: ObservableObject,
showSpaceManager = true
}

// MARK: - HomeBottomPanelModuleOutput

func onCreateWidgetSelected(context: AnalyticsWidgetContext) {
showCreateWidgetData = CreateWidgetCoordinatorModel(
widgetObjectId: activeWorkspaceStorage.workspaceInfo.widgetsId,
position: .end,
context: context
)
}

// MARK: - HomeBottomNavigationPanelModuleOutput

func onSearchSelected() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ protocol HomeWidgetsModuleAssemblyProtocol {
func make(
info: AccountInfo,
output: HomeWidgetsModuleOutput,
widgetOutput: CommonWidgetModuleOutput?,
bottomPanelOutput: HomeBottomPanelModuleOutput?
widgetOutput: CommonWidgetModuleOutput?
) -> AnyView
}

Expand All @@ -30,15 +29,13 @@ final class HomeWidgetsModuleAssembly: HomeWidgetsModuleAssemblyProtocol {
func make(
info: AccountInfo,
output: HomeWidgetsModuleOutput,
widgetOutput: CommonWidgetModuleOutput?,
bottomPanelOutput: HomeBottomPanelModuleOutput?
widgetOutput: CommonWidgetModuleOutput?
) -> AnyView {
let view = HomeWidgetsView(
model: self.modelProvider(
info: info,
output: output,
widgetOutput: widgetOutput,
bottomPanelOutput: bottomPanelOutput
widgetOutput: widgetOutput
)
)
return view.id(info.widgetsId).eraseToAnyView()
Expand All @@ -50,8 +47,7 @@ final class HomeWidgetsModuleAssembly: HomeWidgetsModuleAssemblyProtocol {
private func modelProvider(
info: AccountInfo,
output: HomeWidgetsModuleOutput,
widgetOutput: CommonWidgetModuleOutput?,
bottomPanelOutput: HomeBottomPanelModuleOutput?
widgetOutput: CommonWidgetModuleOutput?
) -> HomeWidgetsViewModel {
let stateManager = HomeWidgetsStateManager()
let recentStateManagerProtocol = HomeWidgetsRecentStateManager(
Expand All @@ -63,7 +59,6 @@ final class HomeWidgetsModuleAssembly: HomeWidgetsModuleAssemblyProtocol {
info: info,
registry: widgetsSubmoduleDI.homeWidgetsRegistry(stateManager: stateManager, widgetOutput: widgetOutput),
blockWidgetService: serviceLocator.blockWidgetService(),
bottomPanelProviderAssembly: widgetsSubmoduleDI.bottomPanelProviderAssembly(output: bottomPanelOutput),
stateManager: stateManager,
objectActionService: serviceLocator.objectActionsService(),
recentStateManagerProtocol: recentStateManagerProtocol,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ import Foundation
@MainActor
protocol HomeWidgetsModuleOutput: AnyObject, CommonWidgetModuleOutput {
func onSpaceSelected()
func onCreateWidgetSelected(context: AnalyticsWidgetContext)
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ struct HomeWidgetsView: View {
.fitIPadToReadableContentGuide()
}
.animation(.default, value: model.models.count)
model.bottomPanelProvider.view
.fitIPadToReadableContentGuide()

HomeBottomPanelView(homeState: $model.homeState) {
model.onCreateWidgetSelected()
}
}
.task {
await model.startParticipantTask()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ final class HomeWidgetsViewModel: ObservableObject {
// MARK: - State

@Published var models: [HomeWidgetSubmoduleModel] = []
@Published var bottomPanelProvider: HomeSubmoduleProviderProtocol
@Published var homeState: HomeWidgetsState = .readonly
@Published var dataLoaded: Bool = false
@Published var wallpaper: BackgroundType = .default
Expand All @@ -35,7 +34,6 @@ final class HomeWidgetsViewModel: ObservableObject {
info: AccountInfo,
registry: HomeWidgetsRegistryProtocol,
blockWidgetService: BlockWidgetServiceProtocol,
bottomPanelProviderAssembly: HomeBottomPanelProviderAssemblyProtocol,
stateManager: HomeWidgetsStateManagerProtocol,
objectActionService: ObjectActionsServiceProtocol,
recentStateManagerProtocol: HomeWidgetsRecentStateManagerProtocol,
Expand All @@ -48,7 +46,6 @@ final class HomeWidgetsViewModel: ObservableObject {
self.widgetObject = documentService.document(objectId: info.widgetsId)
self.registry = registry
self.blockWidgetService = blockWidgetService
self.bottomPanelProvider = bottomPanelProviderAssembly.make(info: info, stateManager: stateManager)
self.stateManager = stateManager
self.objectActionService = objectActionService
self.recentStateManagerProtocol = recentStateManagerProtocol
Expand Down Expand Up @@ -97,6 +94,10 @@ final class HomeWidgetsViewModel: ObservableObject {
output
}

func onCreateWidgetSelected() {
output?.onCreateWidgetSelected(context: .editor)
}

// TODO: Delete after migration.
func onHomeStateChanged() {
if stateManager.homeState != homeState {
Expand Down
Loading
Loading