Fixed diff buttons disappearing when using split mode

Fixes #169
This commit is contained in:
Abdelilah El Aissaoui 2023-10-10 16:37:10 +02:00
parent b25375dad8
commit 950c9398bf
No known key found for this signature in database
GPG key ID: 7587FC860F594869
2 changed files with 5 additions and 3 deletions

View file

@ -7,15 +7,17 @@ import org.eclipse.jgit.submodule.SubmoduleStatus
sealed class DiffResult(
val diffEntry: DiffEntry,
) {
sealed class TextDiff(diffEntry: DiffEntry): DiffResult(diffEntry)
class Text(
diffEntry: DiffEntry,
val hunks: List<Hunk>
) : DiffResult(diffEntry)
) : TextDiff(diffEntry)
class TextSplit(
diffEntry: DiffEntry,
val hunks: List<SplitHunk>
) : DiffResult(diffEntry)
) : TextDiff(diffEntry)
class NonText(
diffEntry: DiffEntry,

View file

@ -121,7 +121,7 @@ fun Diff(
diffEntry = diffEntry,
onCloseDiffView = onCloseDiffView,
diffType = diffType,
isTextDiff = diffResult is DiffResult.Text,
isTextDiff = diffResult is DiffResult.TextDiff,
isDisplayFullFile = isDisplayFullFile,
onStageFile = { diffViewModel.stageFile(it) },
onUnstageFile = { diffViewModel.unstageFile(it) },