diff --git a/app/src/main/java/com/myongsik/myongsikandroid/presentation/viewmodel/search/LoveViewModel.kt b/app/src/main/java/com/myongsik/myongsikandroid/presentation/viewmodel/search/LoveViewModel.kt index b3cdeaa5..4175a640 100644 --- a/app/src/main/java/com/myongsik/myongsikandroid/presentation/viewmodel/search/LoveViewModel.kt +++ b/app/src/main/java/com/myongsik/myongsikandroid/presentation/viewmodel/search/LoveViewModel.kt @@ -71,13 +71,12 @@ class LoveViewModel @Inject constructor( } } - private val _scrapRestaurant = MutableLiveData() - val scrapRestaurant: LiveData - get() = _scrapRestaurant + private val _scrapRestaurant = MutableStateFlow(null) + val scrapRestaurant: StateFlow = _scrapRestaurant.asStateFlow() fun scarpRestaurant(requestScrap: RequestScrap) = launch { postScrapRestaurantDataUseCase(requestScrap.toRequestScrapEntity())?.let{ - _scrapRestaurant.postValue(it.toResponseScrapData()) + _scrapRestaurant.value = it.toResponseScrapData() } } } \ No newline at end of file