From d2a4f433e21094081f68c0e3fee465062c130b24 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 11 Aug 2021 20:15:26 -0500 Subject: [PATCH] RemoteTimeline: only display filter message if the host isn't pinned --- app/soapbox/features/remote_timeline/index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/soapbox/features/remote_timeline/index.js b/app/soapbox/features/remote_timeline/index.js index 5f22c4930..6835e25bd 100644 --- a/app/soapbox/features/remote_timeline/index.js +++ b/app/soapbox/features/remote_timeline/index.js @@ -27,6 +27,7 @@ const mapStateToProps = (state, props) => { onlyMedia, hasUnread: state.getIn(['timelines', `${timelineId}${onlyMedia ? ':media' : ''}:${instance}`, 'unread']) > 0, instance, + pinned: settings.getIn(['remote_timeline', 'pinnedHosts']).includes(instance), }; }; @@ -45,6 +46,7 @@ class RemoteTimeline extends React.PureComponent { onlyMedia: PropTypes.bool, timelineId: PropTypes.string, instance: PropTypes.string.isRequired, + pinned: PropTypes.bool, }; componentDidMount() { @@ -80,20 +82,20 @@ class RemoteTimeline extends React.PureComponent { } render() { - const { intl, hasUnread, onlyMedia, timelineId, instance } = this.props; + const { intl, hasUnread, onlyMedia, timelineId, instance, pinned } = this.props; return ( -
+ {!pinned &&
-
+
}