diff options
author | Reto Brunner <reto@labrat.space> | 2020-05-07 00:36:52 +0200 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2020-05-11 09:47:25 -0400 |
commit | c5fdefe7afdc69fc4eefd1ccd702a60b39fc6cb9 (patch) | |
tree | dd4acf793ce84a331b9252382b8796f525456880 /commands/msg | |
parent | fefb08f83107d9ac0d11a93ece85f074585422fe (diff) | |
download | aerc-c5fdefe7afdc69fc4eefd1ccd702a60b39fc6cb9.tar.gz |
msg/read: don't copy waitgroup
Diffstat (limited to 'commands/msg')
-rw-r--r-- | commands/msg/read.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/commands/msg/read.go b/commands/msg/read.go index 8b0c7b11..d27c482e 100644 --- a/commands/msg/read.go +++ b/commands/msg/read.go @@ -99,7 +99,7 @@ func submitReadChange(aerc *widgets.Aerc, store *lib.MessageStore, } func submitReadChangeWg(aerc *widgets.Aerc, store *lib.MessageStore, - uids []uint32, newState bool, wg sync.WaitGroup, success *bool) { + uids []uint32, newState bool, wg *sync.WaitGroup, success *bool) { store.Read(uids, newState, func(msg types.WorkerMessage) { wg.Add(1) switch msg := msg.(type) { @@ -125,12 +125,12 @@ func submitToggle(aerc *widgets.Aerc, store *lib.MessageStore, h *helper) error if len(read) != 0 { newState := false - submitReadChangeWg(aerc, store, read, newState, wg, &success) + submitReadChangeWg(aerc, store, read, newState, &wg, &success) } if len(unread) != 0 { newState := true - submitReadChangeWg(aerc, store, unread, newState, wg, &success) + submitReadChangeWg(aerc, store, unread, newState, &wg, &success) } // we need to do that in the background, else we block the main thread go func() { |