mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-21 13:19:02 +00:00
Fix crash when saving tasks. Fixes #88
This commit is contained in:
parent
17f01dac8e
commit
21ac2866ee
1 changed files with 11 additions and 0 deletions
|
|
@ -350,6 +350,9 @@ public class Task extends BaseModel {
|
|||
|
||||
@Override
|
||||
public void save() {
|
||||
if (this.getId() == null || this.getId().length() == 0) {
|
||||
return;
|
||||
}
|
||||
List<TaskTag> tmpTags = tags;
|
||||
List<ChecklistItem> tmpChecklist = checklist;
|
||||
|
||||
|
|
@ -382,6 +385,14 @@ public class Task extends BaseModel {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update() {
|
||||
if (this.getId() == null || this.getId().length() == 0) {
|
||||
return;
|
||||
}
|
||||
super.update();
|
||||
}
|
||||
|
||||
public int getLightTaskColor()
|
||||
{
|
||||
if (this.value < -20)
|
||||
|
|
|
|||
Loading…
Reference in a new issue