fixing some comments from @hiqua

pull/1972/head
Gokul K 2 years ago committed by Alinson S. Xavier
parent 08410c59d0
commit ad8738180c
Signed by: isoron
GPG Key ID: 0DA8E4B9E1109DCA

@ -117,11 +117,11 @@ class NumberDialog : AppCompatDialogFragment() {
val notes = view.notes.text.toString() val notes = view.notes.text.toString()
onToggle(value, notes) onToggle(value, notes)
requireDialog().dismiss() requireDialog().dismiss()
val v = requireActivity().findViewById<LinearLayout>(R.id.konfettiLayout) val konfettiView = requireActivity().findViewById<LinearLayout>(R.id.konfettiLayout)
if (value > 0.0) { if (value > 0.0) {
showConfetti(v) //To motivate, show confetti even if some value is present
showConfetti(konfettiView)
} }
} }
} }

@ -89,7 +89,7 @@ class CheckmarkButtonView(
setOnLongClickListener(this) setOnLongClickListener(this)
} }
fun performToggle(v: View) { fun performToggle(view: View) {
value = Entry.nextToggleValue( value = Entry.nextToggleValue(
value = value, value = value,
isSkipEnabled = preferences.isSkipEnabled, isSkipEnabled = preferences.isSkipEnabled,
@ -98,7 +98,7 @@ class CheckmarkButtonView(
onToggle(value, notes) onToggle(value, notes)
performHapticFeedback(HapticFeedbackConstants.LONG_PRESS) performHapticFeedback(HapticFeedbackConstants.LONG_PRESS)
when (value) { when (value) {
YES_MANUAL -> showConfetti(v.rootView) YES_MANUAL -> showConfetti(view.rootView)
} }
invalidate() invalidate()
} }

Loading…
Cancel
Save