diff --git a/src/main/kotlin/org/jetbrains/plugins/template/toolWindow/ComposeSamplesToolWindowFactory.kt b/src/main/kotlin/org/jetbrains/plugins/template/toolWindow/ComposeSamplesToolWindowFactory.kt index faac271..f75481e 100644 --- a/src/main/kotlin/org/jetbrains/plugins/template/toolWindow/ComposeSamplesToolWindowFactory.kt +++ b/src/main/kotlin/org/jetbrains/plugins/template/toolWindow/ComposeSamplesToolWindowFactory.kt @@ -13,7 +13,7 @@ import org.jetbrains.plugins.template.CoroutineScopeHolder import org.jetbrains.plugins.template.ui.ChatAppSample import org.jetbrains.plugins.template.weatherApp.model.Location 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.services.WeatherForecastService import org.jetbrains.plugins.template.weatherApp.ui.WeatherAppSample @@ -26,10 +26,10 @@ class ComposeSamplesToolWindowFactory : ToolWindowFactory, DumbAware { val locationProviderApi = remember { service() } val viewModel = remember { val weatherForecastServiceApi = WeatherForecastService(Dispatchers.IO) - MyLocationsViewModel( + WeatherAppViewModel( listOf(Location("Munich", "Germany")), coroutineScopeHolder - .createScope(MyLocationsViewModel::class.java.simpleName), + .createScope(WeatherAppViewModel::class.java.simpleName), weatherForecastServiceApi ) } diff --git a/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/services/MyLocationsViewModel.kt b/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/services/WeatherAppViewModel.kt similarity index 99% rename from src/main/kotlin/org/jetbrains/plugins/template/weatherApp/services/MyLocationsViewModel.kt rename to src/main/kotlin/org/jetbrains/plugins/template/weatherApp/services/WeatherAppViewModel.kt index 45e94ae..9078f4f 100644 --- a/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/services/MyLocationsViewModel.kt +++ b/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/services/WeatherAppViewModel.kt @@ -52,7 +52,7 @@ interface WeatherViewModelApi { * @property viewModelScope The coroutine scope in which this ViewModel operates. * @property weatherService The service responsible for fetching weather forecasts for given locations. */ -class MyLocationsViewModel( +class WeatherAppViewModel( myInitialLocations: List, private val viewModelScope: CoroutineScope, private val weatherService: WeatherForecastServiceApi,