mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-19 12:18:59 +00:00
Update coroutine
This commit is contained in:
parent
776c018a13
commit
5662fbc066
1 changed files with 2 additions and 1 deletions
|
|
@ -67,6 +67,7 @@ import com.habitrpg.shared.habitica.models.tasks.HabitResetOption
|
|||
import com.habitrpg.shared.habitica.models.tasks.TaskDifficulty
|
||||
import com.habitrpg.shared.habitica.models.tasks.TaskType
|
||||
import io.realm.RealmList
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.flow.firstOrNull
|
||||
import kotlinx.coroutines.flow.map
|
||||
import kotlinx.coroutines.launch
|
||||
|
|
@ -259,7 +260,7 @@ class TaskFormActivity : BaseActivity() {
|
|||
when {
|
||||
taskId != null -> {
|
||||
isCreating = false
|
||||
lifecycleScope.launch(ExceptionHandler.coroutine()) {
|
||||
lifecycleScope.launch(Dispatchers.Main) {
|
||||
val task =
|
||||
taskRepository.getUnmanagedTask(taskId).firstOrNull() ?: return@launch
|
||||
if (!task.isValid) return@launch
|
||||
|
|
|
|||
Loading…
Reference in a new issue