threads: fix race warnings for client-side debouncing

Client-side thread debouncing happens in a different goroutine. Any
function or variable that is called or accessed by this goroutine should
be protected from a concurrent access.

Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
This commit is contained in:
Koni Marti 2022-07-26 15:41:14 +02:00 committed by Robin Jarry
parent 54a0a377e0
commit 866867c616
2 changed files with 19 additions and 5 deletions
widgets

View file

@ -88,7 +88,7 @@ func (ml *MessageList) Draw(ctx *ui.Context) {
)
if store.ThreadedView() {
threads := store.Threads
threads := store.Threads()
counter := len(store.Uids())
for i := len(threads) - 1; i >= 0; i-- {