refactor(navigation): consolidate navigation with href helpers and extract push device hook
- Migrate all navigation calls from magic strings to centralized href helpers - Extract inline device registration logic into useRegisterPushDevice hook - Remove unused terms and privacy policy routes from profile stack - Add hrefTradeDetail helper for trade detail navigation - Restore routePayloadCache.stashSystemMessage for group request/invite handling - Change desktop shell tab navigation from replace to push
This commit is contained in:
@@ -38,7 +38,7 @@ import { SystemMessageItem } from '../../components/business';
|
||||
import { Text, ResponsiveContainer, AppBackButton } from '../../components/common';
|
||||
import { useCursorPagination } from '../../hooks/useCursorPagination';
|
||||
import * as hrefs from '../../navigation/hrefs';
|
||||
import { useMessageManagerSystemUnreadCount } from '../../stores';
|
||||
import { useMessageManagerSystemUnreadCount, routePayloadCache } from '../../stores';
|
||||
import { messageManager } from '../../stores/message';
|
||||
|
||||
const MESSAGE_TYPES = [
|
||||
@@ -331,8 +331,10 @@ export const NotificationsScreen: React.FC<{ onBack?: () => void }> = ({ onBack
|
||||
router.push(hrefs.hrefUserProfile(extra_data.actor_id_str));
|
||||
}
|
||||
} else if (system_type === 'group_join_apply') {
|
||||
routePayloadCache.stashSystemMessage(message);
|
||||
router.push(hrefs.hrefGroupRequestDetail(message));
|
||||
} else if (system_type === 'group_invite') {
|
||||
routePayloadCache.stashSystemMessage(message);
|
||||
router.push(hrefs.hrefGroupInviteDetail(message));
|
||||
}
|
||||
// 其他类型暂不处理跳转
|
||||
|
||||
Reference in New Issue
Block a user