fix nsfw not refreshing
This commit is contained in:
parent
e3bbb6fcef
commit
1ce926dd98
2 changed files with 8 additions and 5 deletions
|
@ -18,7 +18,6 @@ const defaultState = {
|
|||
platform: process.platform,
|
||||
upgradeSkipped: sessionStorage.getItem("upgradeSkipped"),
|
||||
daemonReady: false,
|
||||
obscureNsfw: !lbry.getClientSetting("showNsfw"),
|
||||
hasSignature: false,
|
||||
badgeNumber: 0,
|
||||
};
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { createSelector } from "reselect";
|
||||
import { parseQueryParams } from "util/query_params";
|
||||
import lbry from "lbry";
|
||||
import lbryuri from "lbryuri";
|
||||
|
||||
export const _selectState = state => state.app || {};
|
||||
|
@ -176,10 +177,13 @@ export const selectDaemonReady = createSelector(
|
|||
state => state.daemonReady
|
||||
);
|
||||
|
||||
export const selectObscureNsfw = createSelector(
|
||||
_selectState,
|
||||
state => !!state.obscureNsfw
|
||||
);
|
||||
/**
|
||||
* Calls to lbry.getClientSetting shouldn't be happening in selector logic, but settings have not
|
||||
* properly been reworked into redux framework. This added as a bug fix to NSFW settings not refreshing.
|
||||
*/
|
||||
export const selectObscureNsfw = () => {
|
||||
return !lbry.getClientSetting("showNsfw");
|
||||
};
|
||||
|
||||
export const selectSnackBar = createSelector(
|
||||
_selectState,
|
||||
|
|
Loading…
Reference in a new issue