]> cat aescling's git repositories - mastodon.git/commitdiff
Hide moved account's follow button in search result (tootsuite pr #5913)
authorcwm <chriswmartin@protonmail.com>
Tue, 9 Jan 2018 14:50:55 +0000 (08:50 -0600)
committercwm <chriswmartin@protonmail.com>
Tue, 9 Jan 2018 14:50:55 +0000 (08:50 -0600)
app/javascript/flavours/glitch/components/account.js

index bb1979cc7b8120189029ba83efa8428beff69a6d..265ee94f679b6ad6ed81b04fa08bdc3918f3991e 100644 (file)
@@ -1,4 +1,4 @@
-import React from 'react';
+import React, { Fragment } from 'react';
 import ImmutablePropTypes from 'react-immutable-proptypes';
 import PropTypes from 'prop-types';
 import Avatar from './avatar';
@@ -94,12 +94,12 @@ export default class Account extends ImmutablePureComponent {
           hidingNotificationsButton = <IconButton active icon='bell-slash' title={intl.formatMessage(messages.mute_notifications, { name: account.get('username')  })} onClick={this.handleMuteNotifications} />;
         }
         buttons = (
-          <div>
+          <Fragment>
             <IconButton active icon='volume-up' title={intl.formatMessage(messages.unmute, { name: account.get('username') })} onClick={this.handleMute} />
             {hidingNotificationsButton}
-          </div>
+          </Fragment>
         );
-      } else {
+      } else if (!account.get('moved')) {
         buttons = <IconButton icon={following ? 'user-times' : 'user-plus'} title={intl.formatMessage(following ? messages.unfollow : messages.follow)} onClick={this.handleFollow} active={following} />;
       }
     }