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
5c5267778b
commit
4a5b2f32f6
@ -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,
|
||||||
|
|||||||
@ -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>()
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user