Remove useless nullability

This commit is contained in:
Quentin Hibon
2021-07-30 21:12:33 +02:00
parent 43921721d4
commit 0ab55f6f5a

View File

@@ -46,8 +46,8 @@ class WidgetBehavior @Inject constructor(
setValue(habit, timestamp, Entry.NO)
}
fun onToggleRepetition(habit: Habit, timestamp: Timestamp?) {
val currentValue = habit.originalEntries.get(timestamp!!).value
fun onToggleRepetition(habit: Habit, timestamp: Timestamp) {
val currentValue = habit.originalEntries.get(timestamp).value
val newValue: Int
newValue =
if (preferences.isSkipEnabled) nextToggleValueWithSkip(