Fix not to show follow button in global suggestion (#16045)

* Fix not to show follow button in global suggestion

* Fix style
master
Takeshi Umeda 4 years ago committed by GitHub
parent 9bb3341849
commit baed52c2a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      app/javascript/mastodon/components/account.js
  2. 6
      app/javascript/mastodon/features/compose/components/search_results.js

@ -78,8 +78,10 @@ class Account extends ImmutablePureComponent {
let buttons; let buttons;
if (onActionClick && actionIcon) { if (actionIcon) {
if (onActionClick) {
buttons = <IconButton icon={actionIcon} title={actionTitle} onClick={this.handleAction} />; buttons = <IconButton icon={actionIcon} title={actionTitle} onClick={this.handleAction} />;
}
} else if (account.get('id') !== me && account.get('relationship', null) !== null) { } else if (account.get('id') !== me && account.get('relationship', null) !== null) {
const following = account.getIn(['relationship', 'following']); const following = account.getIn(['relationship', 'following']);
const requested = account.getIn(['relationship', 'requested']); const requested = account.getIn(['relationship', 'requested']);

@ -55,9 +55,9 @@ class SearchResults extends ImmutablePureComponent {
<AccountContainer <AccountContainer
key={suggestion.get('account')} key={suggestion.get('account')}
id={suggestion.get('account')} id={suggestion.get('account')}
actionIcon={suggestion.get('source') === 'past_interaction' && 'times'} actionIcon={suggestion.get('source') === 'past_interaction' ? 'times' : null}
actionTitle={suggestion.get('source') === 'past_interaction' && intl.formatMessage(messages.dismissSuggestion)} actionTitle={suggestion.get('source') === 'past_interaction' ? intl.formatMessage(messages.dismissSuggestion) : null}
onActionClick={suggestion.get('source') === 'past_interaction' && dismissSuggestion} onActionClick={dismissSuggestion}
/> />
))} ))}
</div> </div>

Loading…
Cancel
Save