mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-15 16:59:41 +00:00
[Glitch] Fix emoji on Wrapstodon
Port 9702cbb41c to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
@@ -37,7 +37,9 @@ export function hydrateStore(rawState) {
|
|||||||
|
|
||||||
dispatch(hydrateCompose());
|
dispatch(hydrateCompose());
|
||||||
dispatch(hydrateSearch());
|
dispatch(hydrateSearch());
|
||||||
dispatch(importFetchedAccounts(Object.values(rawState.accounts)));
|
if (rawState.accounts) {
|
||||||
|
dispatch(importFetchedAccounts(Object.values(rawState.accounts)));
|
||||||
|
}
|
||||||
dispatch(saveSettings());
|
dispatch(saveSettings());
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,10 +2,8 @@ import { createRoot } from 'react-dom/client';
|
|||||||
|
|
||||||
import { Provider as ReduxProvider } from 'react-redux';
|
import { Provider as ReduxProvider } from 'react-redux';
|
||||||
|
|
||||||
import {
|
import { importFetchedStatuses } from '@/flavours/glitch/actions/importer';
|
||||||
importFetchedAccounts,
|
import { hydrateStore } from '@/flavours/glitch/actions/store';
|
||||||
importFetchedStatuses,
|
|
||||||
} from '@/flavours/glitch/actions/importer';
|
|
||||||
import type { ApiAnnualReportResponse } from '@/flavours/glitch/api/annual_report';
|
import type { ApiAnnualReportResponse } from '@/flavours/glitch/api/annual_report';
|
||||||
import { Router } from '@/flavours/glitch/components/router';
|
import { Router } from '@/flavours/glitch/components/router';
|
||||||
import { WrapstodonShare } from '@/flavours/glitch/features/annual_report/share';
|
import { WrapstodonShare } from '@/flavours/glitch/features/annual_report/share';
|
||||||
@@ -33,7 +31,14 @@ function loaded() {
|
|||||||
if (!report) {
|
if (!report) {
|
||||||
throw new Error('Initial state report not found');
|
throw new Error('Initial state report not found');
|
||||||
}
|
}
|
||||||
store.dispatch(importFetchedAccounts(initialState.accounts));
|
|
||||||
|
// Set up store
|
||||||
|
store.dispatch(
|
||||||
|
hydrateStore({
|
||||||
|
meta: { locale: document.documentElement.lang },
|
||||||
|
accounts: initialState.accounts,
|
||||||
|
}),
|
||||||
|
);
|
||||||
store.dispatch(importFetchedStatuses(initialState.statuses));
|
store.dispatch(importFetchedStatuses(initialState.statuses));
|
||||||
|
|
||||||
store.dispatch(setReport(report));
|
store.dispatch(setReport(report));
|
||||||
|
|||||||
@@ -442,7 +442,9 @@ export const composeReducer = (state = initialState, action) => {
|
|||||||
|
|
||||||
switch(action.type) {
|
switch(action.type) {
|
||||||
case STORE_HYDRATE:
|
case STORE_HYDRATE:
|
||||||
return hydrate(state, action.state.get('compose'));
|
if (action.state.get('compose'))
|
||||||
|
return hydrate(state, action.state.get('compose'));
|
||||||
|
return state;
|
||||||
case COMPOSE_MOUNT:
|
case COMPOSE_MOUNT:
|
||||||
return state
|
return state
|
||||||
.set('mounted', state.get('mounted') + 1)
|
.set('mounted', state.get('mounted') + 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user