Skip to content

Commit

Permalink
Merge pull request #114 from snuhcs-course/fix/feed-3-emoji-update
Browse files Browse the repository at this point in the history
Fix 3 preview emoji update on uploading reaction
  • Loading branch information
dawitfamanu authored Dec 7, 2023
2 parents c382d18 + 08c20cc commit 6831a3a
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,16 @@ fun CustomBottomSheet (
var selectedEmojiUnicode by remember { mutableStateOf("") }

LaunchedEffect(selectedEmojiUnicode) {
viewModel.fetchMyCreatedEmojiList()
viewModel.fetchMySavedEmojiList()
reactionViewModel.fetchReactionList(postViewModel.currentPostId, selectedEmojiUnicode)
}

LaunchedEffect(bottomSheetContent) {
if(bottomSheetContent == BottomSheetContent.ADD_REACTION) {
viewModel.fetchMyCreatedEmojiList()
viewModel.fetchMySavedEmojiList()
}
}

ModalBottomSheet(
onDismissRequest = {
coroutineScope.launch {
Expand Down Expand Up @@ -206,6 +211,7 @@ fun CustomBottomSheet (
coroutineScope.launch {
bottomSheetState.hide()
}
postViewModel.fetchPostList()
}
}
}
Expand All @@ -221,6 +227,7 @@ fun CustomBottomSheet (
coroutineScope.launch {
bottomSheetState.hide()
}
postViewModel.fetchPostList()
}
}
}
Expand Down

0 comments on commit 6831a3a

Please sign in to comment.