Add the Config view: edit and save the settings, applied without a restart
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"image/color"
|
||||
"image/jpeg"
|
||||
"image/png"
|
||||
"sync/atomic"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@@ -158,11 +159,11 @@ func TestCoverViewDraws(t *testing.T) {
|
||||
|
||||
func TestLoadCoverCachesAndDedupes(t *testing.T) {
|
||||
a := newTestApp(t)
|
||||
fetches := 0
|
||||
var fetches atomic.Int32
|
||||
var buf bytes.Buffer
|
||||
png.Encode(&buf, stripes(10, 20))
|
||||
ref := coverRef{key: "k", fetch: func(context.Context) ([]byte, error) {
|
||||
fetches++
|
||||
fetches.Add(1)
|
||||
return buf.Bytes(), nil
|
||||
}}
|
||||
|
||||
@@ -173,8 +174,8 @@ func TestLoadCoverCachesAndDedupes(t *testing.T) {
|
||||
if len(a.coverCache.waiting["k"]) != 2 {
|
||||
t.Fatalf("waiters = %d, want 2", len(a.coverCache.waiting["k"]))
|
||||
}
|
||||
if fetches > 1 {
|
||||
t.Errorf("fetched %d times", fetches)
|
||||
if n := fetches.Load(); n > 1 {
|
||||
t.Errorf("fetched %d times", n)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user