From b9707de7accbe9a9f8a8eee77ebb5359054b16d6 Mon Sep 17 00:00:00 2001 From: Abdelilah El Aissaoui Date: Tue, 21 Mar 2023 01:52:55 +0100 Subject: [PATCH] Fixed build error --- .../ui/components/RepositoriesTabPanel.kt | 21 ++----------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/src/main/kotlin/com/jetpackduba/gitnuro/ui/components/RepositoriesTabPanel.kt b/src/main/kotlin/com/jetpackduba/gitnuro/ui/components/RepositoriesTabPanel.kt index 3b35d3e..c702d2c 100644 --- a/src/main/kotlin/com/jetpackduba/gitnuro/ui/components/RepositoriesTabPanel.kt +++ b/src/main/kotlin/com/jetpackduba/gitnuro/ui/components/RepositoriesTabPanel.kt @@ -241,7 +241,7 @@ class TabInformation( val tabName: MutableState, val key: Int, val path: String?, - appComponent: AppComponent, + appComponent: AppComponent?, ) { private val tabComponent: TabComponent = DaggerTabComponent.builder() .appComponent(appComponent) @@ -272,24 +272,7 @@ class TabInformation( } } -fun emptyTabInformation() = TabInformation(mutableStateOf(""), 0, "", object : AppComponent { - override fun inject(main: App) {} - override fun appStateManager(): AppStateManager { - error("This method should not be invoked - emptyTabInformation") - } - - override fun settingsViewModel(): SettingsViewModel { - error("This method should not be invoked - emptyTabInformation") - } - - override fun credentialsStateManager(): CredentialsStateManager { - error("This method should not be invoked - emptyTabInformation") - } - - override fun appPreferences(): AppSettings { - error("This method should not be invoked - emptyTabInformation") - } -}) +fun emptyTabInformation() = TabInformation(mutableStateOf(""), 0, "", null) @Composable inline fun gitnuroViewModel(): T {