fixing some comments from @hiqua

This commit is contained in:
Gokul K
2023-07-04 18:50:28 +05:30
committed by Alinson S. Xavier
parent 08410c59d0
commit ad8738180c
2 changed files with 5 additions and 5 deletions

View File

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

View File

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