Skip to content

Commit

Permalink
Merge pull request #103 from snuhcs-course/fix/unsave-toast-ignore-di…
Browse files Browse the repository at this point in the history
…alog

Fix unsave toast appears before confirm unsave warning dialog
  • Loading branch information
yangchanhk98 authored Dec 5, 2023
2 parents 0e4922b + 92e6208 commit cdafd8e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ fun PlayEmojiView(
} else {
if (isSaved) {
showUnSaveDialog = true
Toast.makeText(context, "Emoji unsaved!", Toast.LENGTH_SHORT).show()
} else {
emojiViewModel.saveEmoji(currentEmoji.id)
isSaved = true
Expand Down Expand Up @@ -178,7 +177,8 @@ fun PlayEmojiView(
emojiViewModel.unSaveEmoji(currentEmoji.id)
isSaved = false
savedCount--
showUnSaveDialog = false },
showUnSaveDialog = false
Toast.makeText(context, "Emoji unsaved!", Toast.LENGTH_SHORT).show() },
dismiss = { showUnSaveDialog = false }
)
}
Expand Down

0 comments on commit cdafd8e

Please sign in to comment.