summaryrefslogtreecommitdiffstats
path: root/pkg/gui/context/sub_commits_context.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2024-01-16 17:28:14 +1100
committerJesse Duffield <jessedduffield@gmail.com>2024-01-23 13:03:37 +1100
commita5f3515ad87f978c24d9454d45a454d824eb0897 (patch)
tree59022c18ae15cc5c89e235215a65d6775dab10a2 /pkg/gui/context/sub_commits_context.go
parenta67ad447813ceaf389254b723b0783cf1021f40d (diff)
Set groundwork for better disabled reasons with range select
Something dumb that we're currently doing is expecting list items to define an ID method which returns a string. We use that when copying items to clipboard with ctrl+o and when getting a ref name for diffing. This commit gets us a little deeper into that hole by explicitly requiring list items to implement that method so that we can easily use the new helper functions in list_controller_trait.go. In future we need to just remove the whole ID thing entirely but I'm too lazy to do that right now.
Diffstat (limited to 'pkg/gui/context/sub_commits_context.go')
-rw-r--r--pkg/gui/context/sub_commits_context.go9
1 files changed, 0 insertions, 9 deletions
diff --git a/pkg/gui/context/sub_commits_context.go b/pkg/gui/context/sub_commits_context.go
index 1f795b44d..7a797e61d 100644
--- a/pkg/gui/context/sub_commits_context.go
+++ b/pkg/gui/context/sub_commits_context.go
@@ -175,15 +175,6 @@ func (self *SubCommitsViewModel) GetShowBranchHeads() bool {
return self.showBranchHeads
}
-func (self *SubCommitsContext) GetSelectedItemId() string {
- item := self.GetSelected()
- if item == nil {
- return ""
- }
-
- return item.ID()
-}
-
func (self *SubCommitsContext) CanRebase() bool {
return false
}