feat(Notification): implement notification preferences management and enhance notification handling
- Introduced a new service for managing notification preferences, including push notifications, sound, and vibration settings. - Updated the notification handling logic to respect user preferences, ensuring notifications are displayed according to user settings. - Refactored the App and various screens to integrate the new notification preferences, improving user experience and consistency. - Enhanced the HomeScreen and NotificationSettingsScreen to load and update notification settings seamlessly. - Implemented a mechanism to hide the bottom tab bar based on scroll events, improving navigation usability.
This commit is contained in:
12
src/stores/homeTabBarVisibilityStore.ts
Normal file
12
src/stores/homeTabBarVisibilityStore.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { create } from 'zustand';
|
||||
|
||||
interface HomeTabBarVisibilityState {
|
||||
/** 首页列表下滑时隐藏底部 Tab,上滑或闲置后恢复 */
|
||||
bottomTabBarHiddenByScroll: boolean;
|
||||
setBottomTabBarHiddenByScroll: (hidden: boolean) => void;
|
||||
}
|
||||
|
||||
export const useHomeTabBarVisibilityStore = create<HomeTabBarVisibilityState>((set) => ({
|
||||
bottomTabBarHiddenByScroll: false,
|
||||
setBottomTabBarHiddenByScroll: (hidden) => set({ bottomTabBarHiddenByScroll: hidden }),
|
||||
}));
|
||||
@@ -42,6 +42,9 @@ export { enrichGroupMembersWithUserProfiles } from './groupMemberProfileResolver
|
||||
export { postManager } from './postManager';
|
||||
export { groupManager } from './groupManager';
|
||||
export { userManager } from './userManager';
|
||||
export {
|
||||
useHomeTabBarVisibilityStore,
|
||||
} from './homeTabBarVisibilityStore';
|
||||
export {
|
||||
useConversations as useMessageManagerConversations,
|
||||
useMessages,
|
||||
|
||||
Reference in New Issue
Block a user