Skip to content

Commit

Permalink
chore: Describe the actions instead
Browse files Browse the repository at this point in the history
  • Loading branch information
Ushie authored Jul 29, 2024
1 parent d633681 commit f8a5cf1
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,18 +183,18 @@ fun PatchesSelectorScreen(
),
onToggle = {
when {
// Case when the patch is not supported
// Open unsupported dialog if the patch is not supported
!supported -> vm.openUnsupportedDialog(patch)

// Case when selection warning is enabled
// Show selection warning if enabled
vm.selectionWarningEnabled -> showSelectionWarning = true

// Case when universal patch warning is enabled and there are no compatible packages
// Set pending universal patch action if the universal patch warning is enabled and there are no compatible packages
vm.universalPatchWarningEnabled && patch.compatiblePackages == null -> {
vm.pendingUniversalPatchAction = { vm.togglePatch(uid, patch) }
}

// Default case to toggle the patch
// Toggle the patch otherwise
else -> vm.togglePatch(uid, patch)
}
},
Expand Down Expand Up @@ -555,4 +555,4 @@ private fun OptionsDialog(
}
}
}
}
}

0 comments on commit f8a5cf1

Please sign in to comment.