mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-02 23:27:32 +02:00
Remove unused field gui.IsNewRepo
This commit is contained in:
parent
59303981f9
commit
b07109de4d
@ -108,8 +108,6 @@ type Gui struct {
|
||||
|
||||
PopupHandler types.IPopupHandler
|
||||
|
||||
IsNewRepo bool
|
||||
|
||||
IsRefreshingFiles bool
|
||||
|
||||
// we use this to decide whether we'll return to the original directory that
|
||||
|
@ -21,8 +21,7 @@ func (gui *Gui) updateRecentRepoList() error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
known, recentRepos := newRecentReposList(recentRepos, currentRepo)
|
||||
gui.IsNewRepo = known
|
||||
recentRepos = newRecentReposList(recentRepos, currentRepo)
|
||||
// TODO: migrate this file to use forward slashes on all OSes for consistency
|
||||
// (windows uses backslashes at the moment)
|
||||
gui.c.GetAppState().RecentRepos = recentRepos
|
||||
@ -30,8 +29,7 @@ func (gui *Gui) updateRecentRepoList() error {
|
||||
}
|
||||
|
||||
// newRecentReposList returns a new repo list with a new entry but only when it doesn't exist yet
|
||||
func newRecentReposList(recentRepos []string, currentRepo string) (bool, []string) {
|
||||
isNew := true
|
||||
func newRecentReposList(recentRepos []string, currentRepo string) []string {
|
||||
newRepos := []string{currentRepo}
|
||||
for _, repo := range recentRepos {
|
||||
if repo != currentRepo {
|
||||
@ -39,9 +37,7 @@ func newRecentReposList(recentRepos []string, currentRepo string) (bool, []strin
|
||||
continue
|
||||
}
|
||||
newRepos = append(newRepos, repo)
|
||||
} else {
|
||||
isNew = false
|
||||
}
|
||||
}
|
||||
return isNew, newRepos
|
||||
return newRepos
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user