Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak
2024-07-21 12:48:57 +02:00
parent 973978098e
commit f4a467ab03
4 changed files with 17 additions and 6 deletions

View File

@ -1156,6 +1156,7 @@
"poll_button.add_poll": "Add a poll",
"poll_button.remove_poll": "Remove poll",
"preferences.fields.auto_play_gif_label": "Auto-play animated GIFs",
"preferences.fields.auto_translate_label": "Automatically translate posts in unknown languages",
"preferences.fields.autoload_more_label": "Automatically load more items when scrolled to the bottom of the page",
"preferences.fields.autoload_timelines_label": "Automatically load new posts when scrolled to the top of the page",
"preferences.fields.boost_modal_label": "Show confirmation dialog before reposting",
@ -1167,6 +1168,7 @@
"preferences.fields.display_media.default": "Hide posts marked as sensitive",
"preferences.fields.display_media.hide_all": "Always hide media posts",
"preferences.fields.display_media.show_all": "Always show posts",
"preferences.fields.known_languages_label": "Languages you know",
"preferences.fields.language_label": "Display Language",
"preferences.fields.media_display_label": "Sensitive content",
"preferences.fields.missing_description_modal_label": "Show confirmation dialog before sending a post without media descriptions",
@ -1316,6 +1318,8 @@
"security.update_email.success": "Email successfully updated.",
"security.update_password.fail": "Update password failed.",
"security.update_password.success": "Password successfully updated.",
"select.no_options": "No options available",
"select.placeholder": "Select",
"select_bookmark_folder_modal.header_title": "Select folder",
"settings.account_migration": "Move Account",
"settings.blocks": "Blocks",

View File

@ -5,7 +5,7 @@ import { importFetchedAccount, importFetchedAccounts } from 'soapbox/actions/imp
import { getNextLink } from 'soapbox/api';
import { ChatWidgetScreens, useChatContext } from 'soapbox/contexts/chat-context';
import { useStatContext } from 'soapbox/contexts/stat-context';
import { useApi, useAppDispatch, useAppSelector, useFeatures, useOwnAccount } from 'soapbox/hooks';
import { useApi, useAppDispatch, useAppSelector, useFeatures, useLoggedIn, useOwnAccount } from 'soapbox/hooks';
import { normalizeChatMessage } from 'soapbox/normalizers';
import { ChatMessage } from 'soapbox/types/entities';
import { reOrderChatListItems } from 'soapbox/utils/chats';
@ -87,6 +87,7 @@ const useChats = () => {
const features = useFeatures();
const { setUnreadChatsCount } = useStatContext();
const fetchRelationships = useFetchRelationships();
const { me } = useLoggedIn();
const getChats = async (pageParam?: any): Promise<PaginatedResult<IChat>> => {
const endpoint = features.chatsV2 ? '/api/v2/pleroma/chats' : '/api/v1/pleroma/chats';
@ -115,7 +116,7 @@ const useChats = () => {
queryKey: ['chats', 'search'],
queryFn: ({ pageParam }) => getChats(pageParam),
placeholderData: keepPreviousData,
enabled: features.chats,
enabled: features.chats && !!me,
initialPageParam: { link: undefined as string | undefined },
getNextPageParam: (config) => {
if (config.hasMore) {

View File

@ -358,6 +358,7 @@ const getInstanceFeatures = (instance: Instance) => {
v.software === ICESHRIMP,
v.software === MASTODON && gte(v.version, '3.5.0'),
v.software === TAKAHE && gte(v.version, '0.8.0'),
v.software === MITRA,
features.includes('editing'),
]),
@ -491,6 +492,7 @@ const getInstanceFeatures = (instance: Instance) => {
followRequests: any([
v.software === MASTODON,
v.software === PLEROMA,
v.software === MITRA,
]),
/**
@ -712,6 +714,7 @@ const getInstanceFeatures = (instance: Instance) => {
profileDirectory: any([
v.software === FRIENDICA,
v.software === MASTODON && gte(v.compatVersion, '3.0.0'),
v.software === MITRA,
features.includes('profile_directory'),
]),
@ -723,6 +726,7 @@ const getInstanceFeatures = (instance: Instance) => {
v.software === MASTODON,
v.software === PLEROMA,
v.software === TAKAHE && gte(v.version, '0.7.0'),
v.software === MITRA,
]),
/**
@ -779,6 +783,7 @@ const getInstanceFeatures = (instance: Instance) => {
richText: any([
v.software === MASTODON && v.build === GLITCH,
v.software === PLEROMA,
v.software === MITRA,
]),
/**