Skip to content

Commit

Permalink
Fix ktlint indentation issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Rd4dev committed Nov 22, 2024
1 parent 8f6abca commit a82e5d4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package org.oppia.android.app.player.state

import android.content.Context
import android.util.AttributeSet
import android.util.Log
import android.view.LayoutInflater
import androidx.core.view.isVisible
import androidx.fragment.app.Fragment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,28 +340,28 @@ class DragAndDropSortInteractionViewModel private constructor(
val explorationEphemeralStateLiveData = MediatorLiveData<AsyncResult<EphemeralState>>().apply {
value = AsyncResult.Pending()
addSource(explorationProgressController.getCurrentState().toLiveData()) { result ->
value = result
value = result
}
}

choiceItems = Transformations.map(explorationEphemeralStateLiveData) { result ->
when (result) {
is AsyncResult.Failure, is AsyncResult.Pending -> {
_originalChoiceItems
}
is AsyncResult.Success -> {
_choiceItems = processEphemeralStateResult(
result.value,
contentIdHtmlMap,
dragAndDropSortInteractionViewModel,
resourceHandler
)
_originalChoiceItems = _choiceItems.toMutableList()
_choiceItems
}
else -> _originalChoiceItems
when (result) {
is AsyncResult.Failure, is AsyncResult.Pending -> {
_originalChoiceItems
}
is AsyncResult.Success -> {
_choiceItems = processEphemeralStateResult(
result.value,
contentIdHtmlMap,
dragAndDropSortInteractionViewModel,
resourceHandler
)
_originalChoiceItems = _choiceItems.toMutableList()
_choiceItems
}
else -> _originalChoiceItems
}
}

return _choiceItems.takeIf { !it.isNullOrEmpty() }
?: _originalChoiceItems.toMutableList()
Expand Down

0 comments on commit a82e5d4

Please sign in to comment.