Removed option to stage/unstage lines in other than modified files

This commit is contained in:
Abdelilah El Aissaoui 2024-08-18 20:44:59 +02:00
parent 765bae578f
commit 45629528f2
No known key found for this signature in database
GPG Key ID: 7587FC860F594869

View File

@ -1145,7 +1145,12 @@ fun DiffLineText(line: Line, diffType: DiffType, onActionTriggered: () -> Unit)
val isHovered by hoverInteraction.collectIsHoveredAsState() val isHovered by hoverInteraction.collectIsHoveredAsState()
Box(modifier = Modifier.hoverable(hoverInteraction)) { Box(modifier = Modifier.hoverable(hoverInteraction)) {
if (isHovered && diffType is DiffType.UncommittedDiff && line.lineType != LineType.CONTEXT) { if (
isHovered &&
diffType is DiffType.UncommittedDiff &&
line.lineType != LineType.CONTEXT &&
diffType.statusType == StatusType.MODIFIED
) {
val color: Color = if (diffType is DiffType.StagedDiff) { val color: Color = if (diffType is DiffType.StagedDiff) {
MaterialTheme.colors.error MaterialTheme.colors.error
} else { } else {