Skip to content

Commit a56eaa0

Browse files
authored
Merge pull request #83 from casper-jr/fix/selectedmenu
[FIX] AddMenu에서 선택된 메뉴에 해당하는 data class 추가
2 parents bee3531 + 32a1df2 commit a56eaa0

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

app/src/main/java/com/kuit/ourmenu/ui/addmenu/viewmodel/AddMenuViewModel.kt

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,16 @@ class AddMenuViewModel @Inject constructor(
5757
private val _locationPermissionGranted = MutableStateFlow(false)
5858
val locationPermissionGranted: StateFlow<Boolean> = _locationPermissionGranted.asStateFlow()
5959

60+
private val _selectedMenuData = MutableStateFlow<SelectedMenuData>(
61+
SelectedMenuData(
62+
menuName = "",
63+
price = "",
64+
storeName = "",
65+
address = ""
66+
)
67+
)
68+
val selectedMenuData: StateFlow<SelectedMenuData> = _selectedMenuData.asStateFlow()
69+
6070
init {
6171
viewModelScope.launch {
6272
preferencesManager.locationPermissionGranted.collect { granted ->
@@ -250,10 +260,9 @@ class AddMenuViewModel @Inject constructor(
250260
}
251261
}
252262

253-
// TODO: 이후에 dto 반영시 삭제 예정
254-
data class AddMenuDummyStoreInfo(
255-
val imgList: List<Int> = emptyList(),
256-
val name: String = "",
263+
data class SelectedMenuData(
264+
val menuName: String = "",
265+
val price: String = "",
266+
val storeName: String = "",
257267
val address: String = "",
258-
val menuList: List<Boolean> = emptyList(),
259268
)

0 commit comments

Comments
 (0)