mirror of
https://github.com/JetBrains/intellij-platform-plugin-template.git
synced 2025-12-05 06:11:52 +00:00
Rename MyLocationsViewModel to WeatherAppViewModel
This commit is contained in:
parent
2486e30710
commit
5c5267778b
@ -8,14 +8,14 @@ import com.intellij.openapi.wm.ToolWindowFactory
|
||||
import org.jetbrains.jewel.bridge.addComposeTab
|
||||
import org.jetbrains.plugins.template.ui.ChatAppSample
|
||||
import org.jetbrains.plugins.template.weatherApp.services.LocationsProvider
|
||||
import org.jetbrains.plugins.template.weatherApp.services.MyLocationsViewModel
|
||||
import org.jetbrains.plugins.template.weatherApp.services.WeatherAppViewModel
|
||||
import org.jetbrains.plugins.template.weatherApp.ui.WeatherAppSample
|
||||
|
||||
class MyToolWindowFactory : ToolWindowFactory, DumbAware {
|
||||
|
||||
override fun createToolWindowContent(project: Project, toolWindow: ToolWindow) {
|
||||
toolWindow.addComposeTab("Weather App") {
|
||||
val viewModel = service<MyLocationsViewModel>()
|
||||
val viewModel = service<WeatherAppViewModel>()
|
||||
val locationProviderApi = service<LocationsProvider>()
|
||||
WeatherAppSample(
|
||||
viewModel,
|
||||
|
||||
@ -39,7 +39,7 @@ internal interface WeatherViewModelApi {
|
||||
}
|
||||
|
||||
@Service
|
||||
internal class MyLocationsViewModel(cs: CoroutineScope) : MyLocationsViewModelApi, WeatherViewModelApi {
|
||||
internal class WeatherAppViewModel(cs: CoroutineScope) : MyLocationsViewModelApi, WeatherViewModelApi {
|
||||
|
||||
private val weatherService = service<WeatherForecastService>()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user