mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 01:08:50 -06:00
Allow user to disable confetti animation
This commit is contained in:
@@ -224,6 +224,7 @@ class ListHabitsScreen
|
||||
}
|
||||
|
||||
override fun showConfetti(color: PaletteColor, x: Float, y: Float) {
|
||||
if (preferences.isConfettiAnimationDisabled) return
|
||||
val baseColor = themeSwitcher.currentTheme!!.color(color).toInt()
|
||||
rootView.get().konfettiView.start(
|
||||
Party(
|
||||
|
||||
@@ -233,4 +233,6 @@
|
||||
<string name="activity_not_found">No app was found to support this action</string>
|
||||
<string name="pref_midnight_delay_title">Extend day a few hours past midnight</string>
|
||||
<string name="pref_midnight_delay_description">Wait until 3:00 AM to show a new day. Useful if you typically go to sleep after midnight. Requires app restart.</string>
|
||||
<string name="pref_animations_title">Disable animations</string>
|
||||
<string name="pref_animations_description">Disable confetti animation after adding a checkmark.</string>
|
||||
</resources>
|
||||
|
||||
@@ -67,6 +67,13 @@
|
||||
android:title="@string/use_pure_black"
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
android:defaultValue="false"
|
||||
android:key="pref_disable_animation"
|
||||
android:summary="@string/pref_animations_description"
|
||||
android:title="@string/pref_animations_title"
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="255"
|
||||
android:entries="@array/widget_opacity_entries"
|
||||
|
||||
Reference in New Issue
Block a user