No changes in commit diff #147
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request makes improvements to the
CommitDiffView
inGitClient/Views/Commit/CommitDiffView.swift
to enhance user experience and simplify the code by removing unnecessary parameters. The key changes include adding a "No Changes" message when there are no file differences and refactoring theupdateDiff
method to remove thecached
parameter.User Experience Improvements:
filesChangesIsEmpty
to track whether there are any file changes. If no changes are detected, a "No Changes" message with aLabel
is displayed in theScrollView
. ([GitClient/Views/Commit/CommitDiffView.swiftR18-R33](https://github.com/maoyama/Tempo/pull/147/files#diff-51f1ff4df91dce0f310e65c2690f4fe206a33ba9f281a6d38eca08caface7cd4R18-R33)
)shortstat
string to display "No Changes" when it is empty, providing clearer feedback to the user. ([GitClient/Views/Commit/CommitDiffView.swiftL70-R104](https://github.com/maoyama/Tempo/pull/147/files#diff-51f1ff4df91dce0f310e65c2690f4fe206a33ba9f281a6d38eca08caface7cd4L70-R104)
)Code Simplifications:
cached
parameter from theupdateDiff
method and its associated calls, simplifying the method signature and logic. ([GitClient/Views/Commit/CommitDiffView.swiftL70-R104](https://github.com/maoyama/Tempo/pull/147/files#diff-51f1ff4df91dce0f310e65c2690f4fe206a33ba9f281a6d38eca08caface7cd4L70-R104)
)