rename Subscriptions -> Following. fix bad subs.

This commit is contained in:
Akinwale Ariwodola 2019-12-29 14:56:15 +01:00
parent f7c8bf3949
commit 1eecae469d
2 changed files with 6 additions and 3 deletions

View file

@ -10,7 +10,7 @@ import discoverStyle from 'styles/discover';
const groupedMenuItems = { const groupedMenuItems = {
'Find content': [ 'Find content': [
{ icon: 'hashtag', label: 'Your Tags', route: Constants.DRAWER_ROUTE_DISCOVER }, { icon: 'hashtag', label: 'Your Tags', route: Constants.DRAWER_ROUTE_DISCOVER },
{ icon: 'heart', solid: true, label: 'Subscriptions', route: Constants.DRAWER_ROUTE_SUBSCRIPTIONS }, { icon: 'heart', solid: true, label: 'Following', route: Constants.DRAWER_ROUTE_SUBSCRIPTIONS },
{ icon: 'globe-americas', label: 'All Content', route: Constants.DRAWER_ROUTE_TRENDING }, { icon: 'globe-americas', label: 'All Content', route: Constants.DRAWER_ROUTE_TRENDING },
], ],
'Your content': [ 'Your content': [

View file

@ -73,7 +73,7 @@ class SubscriptionsPage extends React.PureComponent {
}; };
componentDidMount() { componentDidMount() {
this.onComponentFocused(); // this.onComponentFocused();
} }
componentWillReceiveProps(nextProps) { componentWillReceiveProps(nextProps) {
@ -115,7 +115,10 @@ class SubscriptionsPage extends React.PureComponent {
unsubscribeShortChannelUrls = () => { unsubscribeShortChannelUrls = () => {
// this should only have to happen once // this should only have to happen once
const { subscribedChannels, channelUnsubscribe } = this.props; const { subscribedChannels, channelUnsubscribe } = this.props;
const badSubs = subscribedChannels.filter(sub => sub.uri.split('#')[1].length < 5); const badSubs = subscribedChannels.filter(sub => {
const parts = sub.uri.split('#');
return parts.length === 1 || parts[1].length < 5;
});
if (badSubs.length > 0) { if (badSubs.length > 0) {
badSubs.forEach(sub => channelUnsubscribe(sub)); badSubs.forEach(sub => channelUnsubscribe(sub));
} }