fix search box followers & profile button update

This commit is contained in:
Martti Malmi 2021-08-13 14:09:23 +03:00
parent 7f1eb8cd15
commit ff7e06c1d6
2 changed files with 5 additions and 5 deletions

View File

@ -120,11 +120,11 @@ class SearchBox extends Component {
if (i.followDistance === 1) {
followText = 'Following';
}
if (i.followDistance === 2) {
if (i.followDistance > 1) {
if (i.followers.size === 1 && Session.getFollows()[[...i.followers][0]] && Session.getFollows()[[...i.followers][0]].name) {
followText = `Followed by ${ Session.getFollows()[[...i.followers][0]].name}`;
} else {
followText = `Followed by ${ i.followers.size } users you follow`;
followText = `${ i.followers.size } followers`;
}
}
return html`

View File

@ -144,14 +144,14 @@ class Profile extends View {
`: this.props.id === SMS_VERIFIER_PUB ? html`
<p><a href="https://iris-sms-auth.herokuapp.com/?pub=${Session.getPubKey()}">${t('ask_for_verification')}</a></p>
` : ''}
${this.isMyProfile ? '' : html`<${FollowButton} id=${this.props.id}/>`}
${this.isMyProfile ? '' : html`<${FollowButton} key=${`${this.props.id}follow`} id=${this.props.id}/>`}
<button onClick=${() => route(`/chat/${ this.props.id}`)}>${t('send_message')}</button>
<${CopyButton} text=${t('copy_link')} title=${this.state.name} copyStr=${`https://iris.to${ window.location.pathname}`}/>
<${CopyButton} key=${`${this.props.id}copy`} text=${t('copy_link')} title=${this.state.name} copyStr=${`https://iris.to${ window.location.pathname}`}/>
<button onClick=${() => $(this.qrRef.current).toggle()}>${t('show_qr_code')}</button>
${this.isMyProfile ? '' : html`
<button class="show-settings" onClick=${() => this.onClickSettings()}>${t('settings')}</button>
`}
${this.isMyProfile ? '' : html`<${BlockButton} id=${this.props.id}/>`}
${this.isMyProfile ? '' : html`<${BlockButton} key=${`${this.props.id}block`} id=${this.props.id}/>`}
</div>
</div>
</div>