Convert Repetition to Kotlin

This commit is contained in:
2020-12-23 18:09:38 -06:00
parent 7d97554cb1
commit 23e9ccb236
8 changed files with 57 additions and 144 deletions

View File

@@ -158,9 +158,9 @@ public class HistoryChart extends ScrollableChart
if (offset < checkmarks.length)
{
if(skipsEnabled)
newValue = Repetition.nextToggleValueWithSkip(checkmarks[offset]);
newValue = Checkmark.Companion.nextToggleValueWithSkip(checkmarks[offset]);
else
newValue = Repetition.nextToggleValueWithoutSkip(checkmarks[offset]);
newValue = Checkmark.Companion.nextToggleValueWithoutSkip(checkmarks[offset]);
}
onToggleCheckmarkListener.onToggleCheckmark(timestamp, newValue);

View File

@@ -66,9 +66,9 @@ class CheckmarkButtonView(
fun performToggle() {
value = if(preferences.isSkipEnabled) {
Repetition.nextToggleValueWithSkip(value)
Checkmark.nextToggleValueWithSkip(value)
} else {
Repetition.nextToggleValueWithoutSkip(value)
Checkmark.nextToggleValueWithoutSkip(value)
}
onToggle(value)
performHapticFeedback(HapticFeedbackConstants.LONG_PRESS)