Rename MyLocationsViewModel to WeatherAppViewModel

This commit is contained in:
Nebojsa Vuksic 2025-07-28 15:50:36 +02:00
parent 2486e30710
commit 5c5267778b
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.MyLocationsViewModel import org.jetbrains.plugins.template.weatherApp.services.WeatherAppViewModel
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<MyLocationsViewModel>() val viewModel = service<WeatherAppViewModel>()
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 MyLocationsViewModel(cs: CoroutineScope) : MyLocationsViewModelApi, WeatherViewModelApi { internal class WeatherAppViewModel(cs: CoroutineScope) : MyLocationsViewModelApi, WeatherViewModelApi {
private val weatherService = service<WeatherForecastService>() private val weatherService = service<WeatherForecastService>()