mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-23 00:39:13 +02:00
start refactoring gui
This commit is contained in:
@ -2,6 +2,7 @@ package gui
|
||||
|
||||
import (
|
||||
"github.com/jesseduffield/lazygit/pkg/commands/models"
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/popup"
|
||||
)
|
||||
|
||||
// list panel functions
|
||||
@ -55,7 +56,7 @@ func (gui *Gui) refreshReflogCommits() error {
|
||||
commits, onlyObtainedNewReflogCommits, err := gui.Git.Loaders.ReflogCommits.
|
||||
GetReflogCommits(lastReflogCommit, filterPath)
|
||||
if err != nil {
|
||||
return gui.surfaceError(err)
|
||||
return gui.PopupHandler.Error(err)
|
||||
}
|
||||
|
||||
if onlyObtainedNewReflogCommits {
|
||||
@ -87,10 +88,10 @@ func (gui *Gui) handleCheckoutReflogCommit() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
err := gui.ask(askOpts{
|
||||
title: gui.Tr.LcCheckoutCommit,
|
||||
prompt: gui.Tr.SureCheckoutThisCommit,
|
||||
handleConfirm: func() error {
|
||||
err := gui.PopupHandler.Ask(popup.AskOpts{
|
||||
Title: gui.Tr.LcCheckoutCommit,
|
||||
Prompt: gui.Tr.SureCheckoutThisCommit,
|
||||
HandleConfirm: func() error {
|
||||
gui.logAction(gui.Tr.Actions.CheckoutReflogCommit)
|
||||
return gui.handleCheckoutRef(commit.Sha, handleCheckoutRefOptions{})
|
||||
},
|
||||
|
Reference in New Issue
Block a user