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 {