mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-19 12:18:59 +00:00
fix checklist issues
This commit is contained in:
parent
cc79b47fb3
commit
0def043b7f
5 changed files with 6 additions and 17 deletions
|
|
@ -2,7 +2,7 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.habitrpg.android.habitica"
|
||||
android:versionCode="1917"
|
||||
android:versionCode="1919"
|
||||
android:versionName="1.1.4"
|
||||
android:screenOrientation="portrait"
|
||||
android:installLocation="auto" >
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ public class TaskRepositoryImpl extends BaseRepositoryImpl<TaskLocalRepository>
|
|||
|
||||
public Observable<Task> scoreChecklistItem(String taskId, String itemId) {
|
||||
return apiClient.scoreChecklistItem(taskId, itemId)
|
||||
.flatMap(task -> localRepository.getTask(taskId))
|
||||
.flatMap(task -> localRepository.getTask(taskId).first())
|
||||
.doOnNext(task -> localRepository.executeTransaction(realm -> {
|
||||
for (ChecklistItem item : task.getChecklist()) {
|
||||
if (itemId.equals(item.getId())) {
|
||||
|
|
|
|||
|
|
@ -5,11 +5,7 @@ import java.util.Date;
|
|||
import io.realm.RealmObject;
|
||||
import io.realm.annotations.PrimaryKey;
|
||||
|
||||
/**
|
||||
* Created by keithholliday on 5/31/16.
|
||||
*/
|
||||
public class RemindersItem extends RealmObject {
|
||||
Task task;
|
||||
@PrimaryKey
|
||||
private String id;
|
||||
private Date startDate;
|
||||
|
|
@ -51,14 +47,6 @@ public class RemindersItem extends RealmObject {
|
|||
this.time = time;
|
||||
}
|
||||
|
||||
public Task getTask() {
|
||||
return task;
|
||||
}
|
||||
|
||||
public void setTask(Task task) {
|
||||
this.task = task;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return this.type;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -278,9 +278,6 @@ public class Task extends RealmObject implements Parcelable {
|
|||
}
|
||||
|
||||
public void setReminders(RealmList<RemindersItem> reminders) {
|
||||
for (RemindersItem reminder : reminders) {
|
||||
reminder.setTask(this);
|
||||
}
|
||||
this.reminders = reminders;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1091,6 +1091,10 @@ public class TaskFormActivity extends BaseActivity implements AdapterView.OnItem
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!task.isValid()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
taskRepository.executeTransaction(realm -> {
|
||||
task.text = text;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue