Merge commit 'd20d04922672ed016029c40ed64798f341ebca91' into glitch-soc/merge-upstream
This commit is contained in:
commit
06176deee2
50 files changed
+710
-112
No files matched your search
@@ -329,7 +329,7 @@ export function uploadCompose(files) {
|
||||
dispatch(showAlert({ message: messages.uploadQuote }));
|
||||
return;
|
||||
}
|
||||
const uploadLimit = getState().getIn(['server', 'server', 'configuration', 'statuses', 'max_media_attachments']);
|
||||
const uploadLimit = getState().getIn(['server', 'server', 'item', 'configuration', 'statuses', 'max_media_attachments']);
|
||||
const media = getState().getIn(['compose', 'media_attachments']);
|
||||
const pending = getState().getIn(['compose', 'pending_media_attachments']);
|
||||
const progress = new Array(files.length).fill(0);
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import type { ApiCustomEmojiJSON } from '@/mastodon/api_types/custom_emoji';
|
||||
import { loadCustomEmoji } from '@/mastodon/features/emoji';
|
||||
import { emojiLogger } from '@/mastodon/features/emoji/utils';
|
||||
|
||||
const log = emojiLogger('actions');
|
||||
|
||||
export async function importCustomEmoji(emojis: ApiCustomEmojiJSON[]) {
|
||||
if (emojis.length === 0) {
|
||||
@@ -18,5 +21,11 @@ export async function importCustomEmoji(emojis: ApiCustomEmojiJSON[]) {
|
||||
if (existingEmojis.length < emojis.length) {
|
||||
await clearCache('custom');
|
||||
await loadCustomEmoji();
|
||||
|
||||
const { reloadCustomEmojis } =
|
||||
await import('@/mastodon/features/emoji/picker');
|
||||
await reloadCustomEmojis();
|
||||
|
||||
log('Custom emojis updated, reloaded cache and picker data.');
|
||||
}
|
||||
}
|
||||
@@ -16,19 +16,33 @@ export const fetchServer = createDataLoadingThunk(
|
||||
dispatch(importFetchedAccount(instance.contact.account));
|
||||
}
|
||||
},
|
||||
{
|
||||
condition: (_, { getState }) => !getState().server.server.isLoading,
|
||||
},
|
||||
);
|
||||
|
||||
export const fetchExtendedDescription = createDataLoadingThunk(
|
||||
'server/extended_description',
|
||||
() => apiGetExtendedDescription(),
|
||||
{
|
||||
condition: (_, { getState }) =>
|
||||
!getState().server.extendedDescription.isLoading,
|
||||
},
|
||||
);
|
||||
|
||||
export const fetchServerTranslationLanguages = createDataLoadingThunk(
|
||||
'server/translation_languages',
|
||||
() => apiGetTranslationLanguages(),
|
||||
{
|
||||
condition: (_, { getState }) =>
|
||||
!getState().server.translationLanguages.isLoading,
|
||||
},
|
||||
);
|
||||
|
||||
export const fetchDomainBlocks = createDataLoadingThunk(
|
||||
'server/domain_blocks',
|
||||
() => apiGetDomainBlocks(),
|
||||
{
|
||||
condition: (_, { getState }) => !getState().server.domainBlocks.isLoading,
|
||||
},
|
||||
);
|
||||
Reference in new issue
Block a user