diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-09-02 11:57:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-02 11:57:06 +0200 |
commit | 2a46fcc3ed6b9c013c549d7bcd3f1827ec8c306c (patch) | |
tree | 0e4729d2b93ca14b4810c3816949bc4c6c915aab /app/javascript/flavours/glitch/features/community_timeline | |
parent | d4e63cd980a87b7bdbde57124d230e7e60ec38f1 (diff) |
Fix regexp filtering in pinned community/public TLs (#1840)
Diffstat (limited to 'app/javascript/flavours/glitch/features/community_timeline')
-rw-r--r-- | app/javascript/flavours/glitch/features/community_timeline/index.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/features/community_timeline/index.js b/app/javascript/flavours/glitch/features/community_timeline/index.js index 7341f9702..64030e195 100644 --- a/app/javascript/flavours/glitch/features/community_timeline/index.js +++ b/app/javascript/flavours/glitch/features/community_timeline/index.js @@ -19,11 +19,13 @@ const mapStateToProps = (state, { columnId }) => { const columns = state.getIn(['settings', 'columns']); const index = columns.findIndex(c => c.get('uuid') === uuid); const onlyMedia = (columnId && index >= 0) ? columns.get(index).getIn(['params', 'other', 'onlyMedia']) : state.getIn(['settings', 'community', 'other', 'onlyMedia']); + const regex = (columnId && index >= 0) ? columns.get(index).getIn(['params', 'regex', 'body']) : state.getIn(['settings', 'community', 'regex', 'body']); const timelineState = state.getIn(['timelines', `community${onlyMedia ? ':media' : ''}`]); return { hasUnread: !!timelineState && timelineState.get('unread') > 0, onlyMedia, + regex, }; }; @@ -46,6 +48,7 @@ class CommunityTimeline extends React.PureComponent { hasUnread: PropTypes.bool, multiColumn: PropTypes.bool, onlyMedia: PropTypes.bool, + regex: PropTypes.string, }; handlePin = () => { @@ -127,6 +130,7 @@ class CommunityTimeline extends React.PureComponent { onLoadMore={this.handleLoadMore} emptyMessage={<FormattedMessage id='empty_column.community' defaultMessage='The local timeline is empty. Write something publicly to get the ball rolling!' />} bindToDocument={!multiColumn} + regex={this.props.regex} /> </Column> ); |