summaryrefslogtreecommitdiffstats
path: root/pkg/gui/gui.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-07-31 13:52:56 +1000
committerJesse Duffield <jessedduffield@gmail.com>2022-07-31 14:34:57 +1000
commit7077ea428f17a4a04de88884512022381bf4db7b (patch)
treea5b9e81444650679190e858d901881d166c94338 /pkg/gui/gui.go
parentc26650258de34659149e2bb70b8e01054f0a1d1a (diff)
add optimistic rendering for staging and unstaging files
Diffstat (limited to 'pkg/gui/gui.go')
-rw-r--r--pkg/gui/gui.go16
1 files changed, 2 insertions, 14 deletions
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go
index 531a43035..04b53e074 100644
--- a/pkg/gui/gui.go
+++ b/pkg/gui/gui.go
@@ -97,7 +97,7 @@ type Gui struct {
// recent repo with the recent repos popup showing
showRecentRepos bool
- Mutexes guiMutexes
+ Mutexes types.Mutexes
// findSuggestions will take a string that the user has typed into a prompt
// and return a slice of suggestions which match that string.
@@ -237,18 +237,6 @@ const (
COMPLETE
)
-// if you add a new mutex here be sure to instantiate it. We're using pointers to
-// mutexes so that we can pass the mutexes to controllers.
-type guiMutexes struct {
- RefreshingFilesMutex *sync.Mutex
- RefreshingStatusMutex *sync.Mutex
- SyncMutex *sync.Mutex
- LocalCommitsMutex *sync.Mutex
- LineByLinePanelMutex *sync.Mutex
- SubprocessMutex *sync.Mutex
- PopupMutex *sync.Mutex
-}
-
func (gui *Gui) onNewRepo(startArgs types.StartArgs, reuseState bool) error {
var err error
gui.git, err = commands.NewGitCommand(
@@ -418,7 +406,7 @@ func NewGui(
// but now we do it via state. So we need to still support the config for the
// sake of backwards compatibility. We're making use of short circuiting here
ShowExtrasWindow: cmn.UserConfig.Gui.ShowCommandLog && !config.GetAppState().HideCommandLog,
- Mutexes: guiMutexes{
+ Mutexes: types.Mutexes{
RefreshingFilesMutex: &sync.Mutex{},
RefreshingStatusMutex: &sync.Mutex{},
SyncMutex: &sync.Mutex{},