1
0
mirror of https://github.com/funamitech/mastodon synced 2024-11-30 07:49:04 +09:00

[Glitch] Wait until relationship is loaded before showing follow button

Port cd049454be to glitch-soc
This commit is contained in:
Thibaut Girka 2018-08-27 17:43:55 +02:00 committed by ThibG
parent 8852fff3a4
commit 3106c81b1e

View File

@ -56,7 +56,9 @@ export default class Header extends ImmutablePureComponent {
}
if (me !== account.get('id')) {
if (account.getIn(['relationship', 'requested'])) {
if (!account.get('relationship')) { // Wait until the relationship is loaded
actionBtn = '';
} else if (account.getIn(['relationship', 'requested'])) {
actionBtn = (
<div className='account--action-button'>
<IconButton size={26} active icon='hourglass' title={intl.formatMessage(messages.requested)} onClick={this.props.onFollow} />