Fix: 絵文字リアクション受け入れ設定をしているアカウントのリアクションボタンが正常に表示されない場合がある問題 (#830)
This commit is contained in:
parent
c7c9f8d1f8
commit
71671b09ef
3 changed files with 12 additions and 4 deletions
|
@ -1,7 +1,9 @@
|
|||
import { browserHistory } from 'mastodon/components/router';
|
||||
import { me } from 'mastodon/initial_state';
|
||||
|
||||
import api from '../api';
|
||||
|
||||
import { fetchRelationships } from './accounts';
|
||||
import { ensureComposeIsVisible, setComposeToStatus } from './compose';
|
||||
import { importFetchedStatus, importFetchedStatuses, importFetchedAccount } from './importer';
|
||||
import { deleteFromTimelines } from './timelines';
|
||||
|
@ -65,6 +67,12 @@ export function fetchStatus(id, forceFetch = false) {
|
|||
|
||||
api().get(`/api/v1/statuses/${id}`).then(response => {
|
||||
dispatch(importFetchedStatus(response.data));
|
||||
|
||||
const accountId = response.data.account.id;
|
||||
if (me && !getState().getIn(['relationships', accountId])) {
|
||||
dispatch(fetchRelationships([accountId]));
|
||||
}
|
||||
|
||||
dispatch(fetchStatusSuccess(skipLoading));
|
||||
}).catch(error => {
|
||||
dispatch(fetchStatusFail(id, error, skipLoading));
|
||||
|
|
|
@ -478,8 +478,8 @@ class StatusActionBar extends ImmutablePureComponent {
|
|||
|
||||
const emojiReactionAvailableServer = !isHideItem('emoji_reaction_unavailable_server') || account.getIn(['server_features', 'emoji_reaction']);
|
||||
const emojiReactionPolicy = account.getIn(['other_settings', 'emoji_reaction_policy']) || 'allow';
|
||||
const following = emojiReactionPolicy !== 'following_only' || (relationship && relationship.get('following'));
|
||||
const followed = emojiReactionPolicy !== 'followers_only' || (relationship && relationship.get('followed_by'));
|
||||
const following = emojiReactionPolicy !== 'followers_only' || (relationship && relationship.get('following'));
|
||||
const followed = emojiReactionPolicy !== 'following_only' || (relationship && relationship.get('followed_by'));
|
||||
const mutual = emojiReactionPolicy !== 'mutuals_only' || (relationship && relationship.get('following') && relationship.get('followed_by'));
|
||||
const outside = emojiReactionPolicy !== 'outside_only' || (relationship && (relationship.get('following') || relationship.get('followed_by')));
|
||||
const denyFromAll = emojiReactionPolicy !== 'block' && emojiReactionPolicy !== 'block';
|
||||
|
|
|
@ -394,8 +394,8 @@ class ActionBar extends PureComponent {
|
|||
|
||||
const emojiReactionAvailableServer = !isHideItem('emoji_reaction_unavailable_server') || account.getIn(['server_features', 'emoji_reaction']);
|
||||
const emojiReactionPolicy = account.getIn(['other_settings', 'emoji_reaction_policy']) || 'allow';
|
||||
const following = emojiReactionPolicy !== 'following_only' || (relationship && relationship.get('following'));
|
||||
const followed = emojiReactionPolicy !== 'followers_only' || (relationship && relationship.get('followed_by'));
|
||||
const following = emojiReactionPolicy !== 'followers_only' || (relationship && relationship.get('following'));
|
||||
const followed = emojiReactionPolicy !== 'following_only' || (relationship && relationship.get('followed_by'));
|
||||
const mutual = emojiReactionPolicy !== 'mutuals_only' || (relationship && relationship.get('following') && relationship.get('followed_by'));
|
||||
const outside = emojiReactionPolicy !== 'outside_only' || (relationship && (relationship.get('following') || relationship.get('followed_by')));
|
||||
const denyFromAll = emojiReactionPolicy !== 'block' && emojiReactionPolicy !== 'block';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue