From c5fdefe7afdc69fc4eefd1ccd702a60b39fc6cb9 Mon Sep 17 00:00:00 2001 From: Reto Brunner Date: Thu, 7 May 2020 00:36:52 +0200 Subject: msg/read: don't copy waitgroup --- commands/msg/read.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/commands/msg/read.go b/commands/msg/read.go index 8b0c7b1..d27c482 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() { -- cgit 1.4.1-2-gfad0