2020-01-14 07:07:41 -05:00
|
|
|
export function hasInlineLines(diffFile) {
|
2020-02-03 04:08:42 -05:00
|
|
|
return diffFile?.highlighted_diff_lines?.length > 0;
|
2020-01-14 07:07:41 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
export function hasParallelLines(diffFile) {
|
2020-02-03 04:08:42 -05:00
|
|
|
return diffFile?.parallel_diff_lines?.length > 0;
|
2020-01-14 07:07:41 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
export function isSingleViewStyle(diffFile) {
|
|
|
|
return !hasParallelLines(diffFile) || !hasInlineLines(diffFile);
|
|
|
|
}
|
|
|
|
|
|
|
|
export function hasDiff(diffFile) {
|
2020-02-03 04:08:42 -05:00
|
|
|
return hasInlineLines(diffFile) || hasParallelLines(diffFile) || !diffFile?.blob?.readable_text;
|
2020-01-14 07:07:41 -05:00
|
|
|
}
|