Skip to content

Commit 14d7252

Browse files
committed
no need to use the integer here
1 parent 8076aaa commit 14d7252

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

todoapp/app/src/main/java/com/example/android/architecture/blueprints/todoapp/data/Task.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public static Task from(ContentValues values) {
136136
String entryId = values.getAsString(TasksPersistenceContract.TaskEntry.COLUMN_NAME_ENTRY_ID);
137137
String title = values.getAsString(TasksPersistenceContract.TaskEntry.COLUMN_NAME_TITLE);
138138
String description = values.getAsString(TasksPersistenceContract.TaskEntry.COLUMN_NAME_DESCRIPTION);
139-
boolean completed = values.getAsInteger(TasksPersistenceContract.TaskEntry.COLUMN_NAME_COMPLETED) == 1 ? true : false;
139+
boolean completed = values.getAsBoolean(TasksPersistenceContract.TaskEntry.COLUMN_NAME_COMPLETED);
140140

141141
return new Task(title, description, entryId, completed);
142142
}

todoapp/app/src/main/java/com/example/android/architecture/blueprints/todoapp/data/source/TasksOperations.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ public void getTask(String taskId, GetTasksCallback callback) {
5757
bundle.putSerializable(TasksOperations.KEY_TASK_ID, taskId);
5858

5959
if (mLoaderManager.getLoader(TASK_LOADER) == null) {
60-
mLoaderManager.initLoader(TASK_LOADER, null, this);
60+
mLoaderManager.initLoader(TASK_LOADER, bundle, this);
6161
} else {
62-
mLoaderManager.restartLoader(TASK_LOADER, null, this);
62+
mLoaderManager.restartLoader(TASK_LOADER, bundle, this);
6363
}
6464
}
6565

0 commit comments

Comments
 (0)