Merge expandSpoilers and displayMedia into a single option

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak
2024-04-21 22:06:53 +02:00
parent a5ab595446
commit 9a5f2bbc77
9 changed files with 27 additions and 42 deletions

View File

@ -31,7 +31,6 @@ const defaultSettings = ImmutableMap({
underlineLinks: false,
autoPlayGif: true,
displayMedia: 'default',
expandSpoilers: false,
unfollowModal: false,
boostModal: false,
deleteModal: true,

View File

@ -46,7 +46,7 @@ describe('fetchStatusQuotes()', () => {
{ type: 'STATUS_QUOTES_FETCH_REQUEST', statusId },
{ type: 'POLLS_IMPORT', polls: [] },
{ type: 'ACCOUNTS_IMPORT', accounts: [status.account] },
{ type: 'STATUSES_IMPORT', statuses: [status], expandSpoilers: false },
{ type: 'STATUSES_IMPORT', statuses: [status] },
{ type: 'STATUS_QUOTES_FETCH_SUCCESS', statusId, statuses: [status], next: null },
];
await store.dispatch(fetchStatusQuotes(statusId));
@ -118,7 +118,7 @@ describe('expandStatusQuotes()', () => {
{ type: 'STATUS_QUOTES_EXPAND_REQUEST', statusId },
{ type: 'POLLS_IMPORT', polls: [] },
{ type: 'ACCOUNTS_IMPORT', accounts: [status.account] },
{ type: 'STATUSES_IMPORT', statuses: [status], expandSpoilers: false },
{ type: 'STATUSES_IMPORT', statuses: [status] },
{ type: 'STATUS_QUOTES_EXPAND_SUCCESS', statusId, statuses: [status], next: null },
];
await store.dispatch(expandStatusQuotes(statusId));