Rename MyLocationsViewModel to WeatherAppViewModel

This commit is contained in:
Nebojsa Vuksic 2025-07-28 16:19:57 +02:00
parent 5c5267778b
commit 4a5b2f32f6
2 changed files with 3 additions and 3 deletions

View File

@ -8,14 +8,14 @@ import com.intellij.openapi.wm.ToolWindowFactory
import org.jetbrains.jewel.bridge.addComposeTab import org.jetbrains.jewel.bridge.addComposeTab
import org.jetbrains.plugins.template.ui.ChatAppSample import org.jetbrains.plugins.template.ui.ChatAppSample
import org.jetbrains.plugins.template.weatherApp.services.LocationsProvider import org.jetbrains.plugins.template.weatherApp.services.LocationsProvider
import org.jetbrains.plugins.template.weatherApp.services.WeatherAppViewModel import org.jetbrains.plugins.template.weatherApp.services.MyLocationsViewModel
import org.jetbrains.plugins.template.weatherApp.ui.WeatherAppSample import org.jetbrains.plugins.template.weatherApp.ui.WeatherAppSample
class MyToolWindowFactory : ToolWindowFactory, DumbAware { class MyToolWindowFactory : ToolWindowFactory, DumbAware {
override fun createToolWindowContent(project: Project, toolWindow: ToolWindow) { override fun createToolWindowContent(project: Project, toolWindow: ToolWindow) {
toolWindow.addComposeTab("Weather App") { toolWindow.addComposeTab("Weather App") {
val viewModel = service<WeatherAppViewModel>() val viewModel = service<MyLocationsViewModel>()
val locationProviderApi = service<LocationsProvider>() val locationProviderApi = service<LocationsProvider>()
WeatherAppSample( WeatherAppSample(
viewModel, viewModel,

View File

@ -39,7 +39,7 @@ internal interface WeatherViewModelApi {
} }
@Service @Service
internal class WeatherAppViewModel(cs: CoroutineScope) : MyLocationsViewModelApi, WeatherViewModelApi { internal class MyLocationsViewModel(cs: CoroutineScope) : MyLocationsViewModelApi, WeatherViewModelApi {
private val weatherService = service<WeatherForecastService>() private val weatherService = service<WeatherForecastService>()