Skip to content

Commit

Permalink
Update ActionFragment.kt
Browse files Browse the repository at this point in the history
  • Loading branch information
1q23lyc45 authored Dec 20, 2024
1 parent 14308db commit 1318574
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import com.topjohnwu.magisk.arch.viewModel
import com.topjohnwu.magisk.databinding.FragmentActionMd2Binding
import com.topjohnwu.magisk.ui.flash.FlashViewModel
import timber.log.Timber
import com.topjohnwu.magisk.core.R as CoreR

class ActionFragment : BaseFragment<FragmentActionMd2Binding>(), MenuProvider {

Expand All @@ -41,9 +40,9 @@ class ActionFragment : BaseFragment<FragmentActionMd2Binding>(), MenuProvider {
viewModel.state.observe(this) {
activity?.supportActionBar?.setSubtitle(
when (it) {
ActionViewModel.State.RUNNING -> CoreR.string.running
ActionViewModel.State.SUCCESS -> CoreR.string.done
ActionViewModel.State.FAILED -> CoreR.string.failure
ActionViewModel.State.RUNNING -> R.string.running
ActionViewModel.State.SUCCESS -> R.string.done
ActionViewModel.State.FAILED -> R.string.failure
}
)
if (it != ActionViewModel.State.RUNNING) {
Expand Down

0 comments on commit 1318574

Please sign in to comment.