refactor(stores): reorganize flat store files into modular directory structure
All checks were successful
Frontend CI / build-and-push-web (push) Successful in 2m29s
Frontend CI / ota-android (push) Successful in 10m35s
Frontend CI / build-android-apk (push) Successful in 37m48s

Migrate from flat file organization to modular directory structure under src/stores/:

- auth/: authStore, registerStore, verificationStore, sessionStore
- call/: callStore
- settings/: chatSettingsStore, themeStore
- ui/: homeTabBarVisibilityStore, homeTabPressStore
- utils/: routePayloadCache
- group/sources.ts, group/profileResolver.ts
- message/sources.ts
- post/sources.ts

Update all import paths across components and screens to use new module paths. Maintain backward compatibility through deprecated re-export files for gradual migration.
This commit is contained in:
lafay
2026-04-13 04:56:58 +08:00
parent 4f31926eb5
commit 57d7c7405c
69 changed files with 1163 additions and 1219 deletions

View File

@@ -20,7 +20,7 @@ import { Avatar, Text } from '../../../../components/common';
import { useAppColors, spacing, fontSizes, shadows, type AppColors } from '../../../../theme';
import { GroupMemberResponse, GroupResponse, GroupAnnouncementResponse } from '../../../../types/dto';
import { useBreakpointGTE } from '../../../../hooks/useResponsive';
import { groupManager } from '../../../../stores/groupManager';
import { groupManager } from '../../../../stores/group';
import { groupService } from '@/services/message';
const { width: screenWidth } = Dimensions.get('window');

View File

@@ -20,7 +20,7 @@ import { Avatar, Text } from '../../../../components/common';
import { useAppColors, spacing, fontSizes, shadows, borderRadius, type AppColors } from '../../../../theme';
import { GroupMemberResponse, GroupResponse, GroupAnnouncementResponse } from '../../../../types/dto';
import { useBreakpointGTE } from '../../../../hooks/useResponsive';
import { groupManager } from '../../../../stores/groupManager';
import { groupManager } from '../../../../stores/group';
import { groupService } from '@/services/message';
const { width: screenWidth } = Dimensions.get('window');

View File

@@ -33,7 +33,7 @@ import {
} from '../../../../types/dto';
import { spacing, useAppColors, type AppColors } from '../../../../theme';
import { SenderInfo } from './types';
import { useChatSettingsStore } from '../../../../stores/chatSettingsStore';
import { useChatSettingsStore } from '../../../../stores/settings';
const IMAGE_MAX_WIDTH = 200;
const IMAGE_MAX_HEIGHT = 260;

View File

@@ -5,7 +5,7 @@
import { StyleSheet, ViewStyle, TextStyle } from 'react-native';
import { spacing, type AppColors } from '../../../../theme';
import { useChatSettingsStore } from '../../../../stores/chatSettingsStore';
import { useChatSettingsStore } from '../../../../stores/settings';
// 默认圆角,但会从 store 读取
export const BUBBLE_RADIUS = 16;

View File

@@ -6,7 +6,7 @@
import { useMemo } from 'react';
import { StyleSheet, Dimensions } from 'react-native';
import { spacing, shadows, useAppColors, type AppColors } from '../../../../theme';
import { useChatSettingsStore, CHAT_THEMES } from '../../../../stores/chatSettingsStore';
import { useChatSettingsStore, CHAT_THEMES } from '../../../../stores/settings';
const { width: SCREEN_WIDTH } = Dimensions.get('window');

View File

@@ -28,8 +28,8 @@ import { ApiError } from '@/services/core';
// 【新架构】使用 MessageManager
import { useChat, useGroupTyping, useGroupMuted, messageManager, callStore } from '../../../../stores';
import { groupService } from '@/services/message';
import { userManager } from '../../../../stores/userManager';
import { groupManager } from '../../../../stores/groupManager';
import { userManager } from '../../../../stores/user';
import { groupManager } from '../../../../stores/group';
import * as hrefs from '../../../../navigation/hrefs';
import { firstRouteParam } from '../../../../navigation/paramUtils';
import {