Skip to content

Commit

Permalink
Remove the show once logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonis Lilis committed Mar 13, 2024
1 parent feafe79 commit 5ad2182
Showing 1 changed file with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,8 @@ class NotificationsDetailListFragment : ListFragment(), NotificationFragment {
showErrorToastAndFinish()
}

val confetti: LottieAnimationView = requireActivity().findViewById(R.id.confetti)
if (note?.isViewMilestoneType == true && !confettiShown) {
confetti.playAnimation()
confettiShown = true
if (note?.isViewMilestoneType == true) {
view?.findViewById<LottieAnimationView>(R.id.confetti)?.playAnimation()
}
}

Expand All @@ -161,9 +159,6 @@ class NotificationsDetailListFragment : ListFragment(), NotificationFragment {
showErrorToastAndFinish()
return
}
if (noteId != note.id) {
confettiShown = false
}
notification = note
}

Expand Down Expand Up @@ -625,8 +620,6 @@ class NotificationsDetailListFragment : ListFragment(), NotificationFragment {
private const val KEY_NOTE_ID = "noteId"
private const val KEY_LIST_POSITION = "listPosition"

private var confettiShown = false

@JvmStatic
fun newInstance(noteId: String?): NotificationsDetailListFragment {
val fragment = NotificationsDetailListFragment()
Expand Down

0 comments on commit 5ad2182

Please sign in to comment.