-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding the ability to force refresh fblo
- Loading branch information
Showing
4 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import createAction from '../../../actions/safeCreateAction'; | ||
|
||
// This is a hack to force the load order to update. | ||
// It's absolutely mandatory to ensure this is | ||
// dispatched sparingly, as it will cause a full re-rendering | ||
// of the load order page EACH time. | ||
export const setFBForceUpdate = | ||
createAction('SET_FB_FORCE_UPDATE', (profileId: string) => ({ profileId })) as any; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { IReducerSpec } from '../../../types/IExtensionContext'; | ||
import { setSafe } from '../../../util/storeHelper'; | ||
|
||
import { generate } from 'shortid'; | ||
|
||
import * as actions from '../actions/session'; | ||
|
||
export const sessionReducer: IReducerSpec = { | ||
reducers: { | ||
[actions.setFBForceUpdate as any]: (state, payload) => { | ||
const { profileId } = payload; | ||
const uId = generate(); | ||
return setSafe(state, [profileId], uId); | ||
} | ||
}, | ||
defaults: {}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters