mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-02-03 13:21:56 +02:00
Show loader when switching worktrees
This commit is contained in:
parent
81a9133261
commit
b5ff55e538
@ -8,6 +8,7 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/jesseduffield/generics/slices"
|
||||
"github.com/jesseduffield/gocui"
|
||||
appTypes "github.com/jesseduffield/lazygit/pkg/app/types"
|
||||
"github.com/jesseduffield/lazygit/pkg/commands"
|
||||
"github.com/jesseduffield/lazygit/pkg/commands/models"
|
||||
@ -143,6 +144,7 @@ func (self *ReposHelper) DispatchSwitchToRepo(path string, reuse bool, contextKe
|
||||
}
|
||||
|
||||
func (self *ReposHelper) DispatchSwitchTo(path string, reuse bool, errMsg string, contextKey types.ContextKey) error {
|
||||
return self.c.WithWaitingStatus(self.c.Tr.Switching, func(gocui.Task) error {
|
||||
env.UnsetGitDirEnvs()
|
||||
originalPath, err := os.Getwd()
|
||||
if err != nil {
|
||||
@ -179,4 +181,5 @@ func (self *ReposHelper) DispatchSwitchTo(path string, reuse bool, errMsg string
|
||||
defer self.c.Mutexes().RefreshingFilesMutex.Unlock()
|
||||
|
||||
return self.onNewRepo(appTypes.StartArgs{}, reuse, contextKey)
|
||||
})
|
||||
}
|
||||
|
@ -544,6 +544,7 @@ type TranslationSet struct {
|
||||
ExitSearchMode string
|
||||
ExitTextFilterMode string
|
||||
SwitchToWorktree string
|
||||
Switching string
|
||||
RemoveWorktree string
|
||||
RemoveWorktreeTitle string
|
||||
DetachWorktree string
|
||||
@ -1278,6 +1279,7 @@ func EnglishTranslationSet() TranslationSet {
|
||||
WorktreesTitle: "Worktrees",
|
||||
WorktreeTitle: "Worktree",
|
||||
SwitchToWorktree: "Switch to worktree",
|
||||
Switching: "Switching",
|
||||
RemoveWorktree: "Remove worktree",
|
||||
RemoveWorktreeTitle: "Remove worktree",
|
||||
RemoveWorktreePrompt: "Are you sure you want to remove worktree '{{.worktreeName}}'?",
|
||||
|
Loading…
x
Reference in New Issue
Block a user