File tree 1 file changed +2
-4
lines changed
1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -182,7 +182,6 @@ type testSettings struct {
182
182
scale float32
183
183
theme fyne.Theme
184
184
185
- listenersLock sync.Mutex
186
185
listeners []func (fyne.Settings )
187
186
changeListeners []chan fyne.Settings
188
187
propertyLock sync.RWMutex
@@ -249,6 +248,7 @@ func (s *testSettings) Scale() float32 {
249
248
func (s * testSettings ) apply () {
250
249
s .propertyLock .RLock ()
251
250
listeners := s .changeListeners
251
+ listenersFns := s .listeners
252
252
s .propertyLock .RUnlock ()
253
253
254
254
for _ , listener := range listeners {
@@ -262,9 +262,7 @@ func (s *testSettings) apply() {
262
262
intapp .ApplySettings (s , s .app )
263
263
s .app .propertyLock .Unlock ()
264
264
265
- s .listenersLock .Lock ()
266
- defer s .listenersLock .Unlock ()
267
- for _ , l := range s .listeners {
265
+ for _ , l := range listenersFns {
268
266
l (s )
269
267
}
270
268
}, false )
You can’t perform that action at this time.
0 commit comments