mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-17 19:29:02 +00:00
Update method names
This commit is contained in:
parent
022ad81290
commit
7e808c8c85
1 changed files with 4 additions and 4 deletions
|
|
@ -83,7 +83,7 @@ class TaskListViewModel @Inject constructor(
|
|||
return taskList
|
||||
}
|
||||
|
||||
private fun getCurrentTasks(): List<Any>? {
|
||||
private fun getCurrentToDos(): List<Any>? {
|
||||
val gson = Gson()
|
||||
val data = mutableListOf<Any>()
|
||||
val tasksString = sharedPreferences.getString("to_do_tasks", null)
|
||||
|
|
@ -106,11 +106,11 @@ class TaskListViewModel @Inject constructor(
|
|||
}
|
||||
|
||||
private fun mapTodos(tasks: List<Task>): List<Any>? {
|
||||
saveCurrentTasks(tasks)
|
||||
return getCurrentTasks()
|
||||
saveCurrentToDos(tasks)
|
||||
return getCurrentToDos()
|
||||
}
|
||||
|
||||
private fun saveCurrentTasks(tasks: List<Task>) {
|
||||
private fun saveCurrentToDos(tasks: List<Task>) {
|
||||
val taskList = mutableListOf<Task>()
|
||||
val type: Type = object : TypeToken<ArrayList<Task?>?>() {}.type
|
||||
if (tasksString != null) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue