mirror of
https://github.com/danbee/persephone
synced 2025-03-04 08:39:11 +00:00
use getState in middleware to read the preferences
This commit is contained in:
parent
8e12b144e6
commit
20430c58e3
@ -13,6 +13,8 @@ let mpdClientMiddleware: Middleware<AppState> = { dispatch, getState in
|
||||
return { action in
|
||||
next(action)
|
||||
|
||||
guard let state = getState() else { return }
|
||||
|
||||
switch action {
|
||||
case is MPDConnectAction:
|
||||
let mpdServer = App.store.state.preferencesState.mpdServer
|
||||
|
||||
Loading…
Reference in New Issue
Block a user