diff --git a/src/views/Community/components/DynamicNewsCard.js b/src/views/Community/components/DynamicNewsCard.js index 3832a143..6994afe1 100644 --- a/src/views/Community/components/DynamicNewsCard.js +++ b/src/views/Community/components/DynamicNewsCard.js @@ -47,6 +47,7 @@ import { usePagination } from './DynamicNewsCard/hooks/usePagination'; import { PAGINATION_CONFIG, DISPLAY_MODES, REFRESH_DEBOUNCE_DELAY } from './DynamicNewsCard/constants'; import { PROFESSIONAL_COLORS } from '../../../constants/professionalTheme'; import { debounce } from '../../../utils/debounce'; +import { useDevice } from '@hooks/useDevice'; // 🔍 调试:渲染计数器 let dynamicNewsCardRenderCount = 0; @@ -81,6 +82,7 @@ const DynamicNewsCardComponent = forwardRef(({ // 通知权限相关 const { browserPermission, requestBrowserPermission } = useNotification(); + const { isMobile } = useDevice(); // Refs const cardHeaderRef = useRef(null); @@ -548,59 +550,61 @@ const [currentMode, setCurrentMode] = useState('vertical'); {/* 右侧:通知开关 + 更新时间 */} - {/* 通知开关 */} - - - - - {browserPermission === 'granted' ? '已开启' : '开启通知'} - - - - + + + {browserPermission === 'granted' ? '已开启' : '开启通知'} + + + + + )} {/* 更新时间 */}