parent
b25375dad8
commit
950c9398bf
2 changed files with 5 additions and 3 deletions
|
@ -7,15 +7,17 @@ import org.eclipse.jgit.submodule.SubmoduleStatus
|
||||||
sealed class DiffResult(
|
sealed class DiffResult(
|
||||||
val diffEntry: DiffEntry,
|
val diffEntry: DiffEntry,
|
||||||
) {
|
) {
|
||||||
|
sealed class TextDiff(diffEntry: DiffEntry): DiffResult(diffEntry)
|
||||||
|
|
||||||
class Text(
|
class Text(
|
||||||
diffEntry: DiffEntry,
|
diffEntry: DiffEntry,
|
||||||
val hunks: List<Hunk>
|
val hunks: List<Hunk>
|
||||||
) : DiffResult(diffEntry)
|
) : TextDiff(diffEntry)
|
||||||
|
|
||||||
class TextSplit(
|
class TextSplit(
|
||||||
diffEntry: DiffEntry,
|
diffEntry: DiffEntry,
|
||||||
val hunks: List<SplitHunk>
|
val hunks: List<SplitHunk>
|
||||||
) : DiffResult(diffEntry)
|
) : TextDiff(diffEntry)
|
||||||
|
|
||||||
class NonText(
|
class NonText(
|
||||||
diffEntry: DiffEntry,
|
diffEntry: DiffEntry,
|
||||||
|
|
|
@ -121,7 +121,7 @@ fun Diff(
|
||||||
diffEntry = diffEntry,
|
diffEntry = diffEntry,
|
||||||
onCloseDiffView = onCloseDiffView,
|
onCloseDiffView = onCloseDiffView,
|
||||||
diffType = diffType,
|
diffType = diffType,
|
||||||
isTextDiff = diffResult is DiffResult.Text,
|
isTextDiff = diffResult is DiffResult.TextDiff,
|
||||||
isDisplayFullFile = isDisplayFullFile,
|
isDisplayFullFile = isDisplayFullFile,
|
||||||
onStageFile = { diffViewModel.stageFile(it) },
|
onStageFile = { diffViewModel.stageFile(it) },
|
||||||
onUnstageFile = { diffViewModel.unstageFile(it) },
|
onUnstageFile = { diffViewModel.unstageFile(it) },
|
||||||
|
|
Loading…
Reference in a new issue