Remove sub_commits_context's Title method
It implemented this because it wants to do custom truncation of the ref name; however, we can achieve the same thing by passing the truncated ref name to our DynamicTitleBuilder, which was previously unused.
This commit is contained in:
@@ -1,14 +1,12 @@
|
||||
package context
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/jesseduffield/lazygit/pkg/commands/git_commands"
|
||||
"github.com/jesseduffield/lazygit/pkg/commands/models"
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/presentation"
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
||||
"github.com/jesseduffield/lazygit/pkg/utils"
|
||||
)
|
||||
|
||||
type SubCommitsContext struct {
|
||||
@@ -160,10 +158,6 @@ func (self *SubCommitsContext) GetCommits() []*models.Commit {
|
||||
return self.getModel()
|
||||
}
|
||||
|
||||
func (self *SubCommitsContext) Title() string {
|
||||
return fmt.Sprintf(self.c.Tr.SubCommitsDynamicTitle, utils.TruncateWithEllipsis(self.ref.RefName(), 50))
|
||||
}
|
||||
|
||||
func (self *SubCommitsContext) SetLimitCommits(value bool) {
|
||||
self.limitCommits = value
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user