mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-22 05:38:55 +00:00
Merge pull request #1857 from kouki4416/fix-daily-streak-bug
Fix deselecting daily item does not decrement count(issue #1845)
This commit is contained in:
commit
2cef29f475
1 changed files with 6 additions and 2 deletions
|
|
@ -145,8 +145,12 @@ class TaskRepositoryImpl(
|
|||
bgTask.value = (bgTask.value - localDelta) + res.delta
|
||||
if (TaskType.DAILY == bgTask.type || TaskType.TODO == bgTask.type) {
|
||||
bgTask.completed = up
|
||||
if (TaskType.DAILY == bgTask.type && up) {
|
||||
bgTask.streak = (bgTask.streak ?: 0) + 1
|
||||
if (TaskType.DAILY == bgTask.type) {
|
||||
if (up) {
|
||||
bgTask.streak = (bgTask.streak ?: 0) + 1
|
||||
} else {
|
||||
bgTask.streak = (bgTask.streak ?: 0) - 1
|
||||
}
|
||||
}
|
||||
} else if (TaskType.HABIT == bgTask.type) {
|
||||
if (up) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue