File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -195,7 +195,7 @@ const readInitialNotification = async (): Promise<Notification | null> => {
195
195
196
196
export const narrowToNotification =
197
197
( data : ?Notification ) : GlobalThunkAction < void > =>
198
- ( dispatch , getState ) => {
198
+ ( dispatch , getState , { activeAccountDispatch } ) => {
199
199
if ( ! data ) {
200
200
return ;
201
201
}
@@ -228,15 +228,7 @@ export const narrowToNotification =
228
228
getOwnUserId ( state ) ,
229
229
) ;
230
230
if ( narrow ) {
231
- // We have a GlobalDispatch, because this is a global thunk action --
232
- // at the top of the function, we didn't yet know which account was
233
- // intended and had to work that out. But now we know we're working on
234
- // the active account, and want to dispatch a per-account action there.
235
- // For the present, we just use the fact that our GlobalDispatch value
236
- // is the same function as we use for Dispatch.
237
- // TODO(#5006): perhaps have an `activeAccountDispatch: Dispatch` in a
238
- // new GlobalThunkExtras, modeled on ThunkExtras?
239
- ( dispatch : $FlowFixMe ) ( doNarrow ( narrow ) ) ;
231
+ activeAccountDispatch ( doNarrow ( narrow ) ) ;
240
232
}
241
233
} ;
242
234
You can’t perform that action at this time.
0 commit comments