您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

functions.ts 931B

12345678910111213141516171819202122232425262728
  1. import { IStateful } from '../base/app/types';
  2. import { toState } from '../base/redux/functions';
  3. /**
  4. * Returns true if follow me is active and false otherwise.
  5. *
  6. * @param {Object|Function} stateful - Object or function that can be resolved
  7. * to the Redux state.
  8. * @returns {boolean} - True if follow me is active and false otherwise.
  9. */
  10. export function isFollowMeActive(stateful: IStateful) {
  11. const state = toState(stateful);
  12. return Boolean(state['features/follow-me'].moderator);
  13. }
  14. /**
  15. * Returns true if follow me is active only for the recorder and false otherwise.
  16. *
  17. * @param {Object|Function} stateful - Object or function that can be resolved
  18. * to the Redux state.
  19. * @returns {boolean} - True if follow me is active and false otherwise.
  20. */
  21. export function isFollowMeRecorderActive(stateful: IStateful) {
  22. const state = toState(stateful);
  23. return Boolean(state['features/follow-me'].recorder);
  24. }