mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 01:08:50 -06:00
fixing some comments from @hiqua
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user