Fix: 絵文字リアクション受け入れ設定をしているアカウントのリアクションボタンが正常に表示されない場合がある問題 (#830)

This commit is contained in:
KMY(雪あすか) 2024-08-31 14:29:05 +09:00 committed by GitHub
parent c7c9f8d1f8
commit 71671b09ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 12 additions and 4 deletions

View file

@ -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));