feat(profile): add chat settings and language options to profile settings
- Introduced hrefProfileChatSettings() for navigation to chat settings. - Updated SettingsScreen to include new settings items for chat settings, language selection, data storage, terms, and privacy policy. - Enhanced user experience by providing alerts for language and data storage options. This update improves the profile settings interface by adding more customization options for users.
This commit is contained in:
@@ -76,6 +76,7 @@ interface CallState {
|
||||
toggleMinimize: () => void;
|
||||
toggleVideo: () => Promise<void>;
|
||||
setVideoEnabled: (enabled: boolean) => Promise<void>;
|
||||
reset: () => void;
|
||||
}
|
||||
|
||||
// Module-level variables for timers
|
||||
@@ -821,4 +822,38 @@ export const callStore = create<CallState>((set, get) => ({
|
||||
console.error('[CallStore] Failed to toggle video:', err);
|
||||
}
|
||||
},
|
||||
|
||||
// 重置所有状态,用于登出时清理
|
||||
reset: () => {
|
||||
// 清理所有定时器和资源
|
||||
cleanupResources();
|
||||
|
||||
// 清理 initCall 的订阅
|
||||
if (initCallUnsub) {
|
||||
initCallUnsub();
|
||||
initCallUnsub = null;
|
||||
}
|
||||
|
||||
// 清理 invited 订阅
|
||||
if (unsubInvited) {
|
||||
unsubInvited();
|
||||
unsubInvited = null;
|
||||
}
|
||||
|
||||
// 清理 WebRTC 资源
|
||||
webrtcManager.dispose();
|
||||
|
||||
// 清理已处理的通话ID缓存
|
||||
processedCallIds.clear();
|
||||
|
||||
// 重置状态
|
||||
set({
|
||||
currentCall: null,
|
||||
incomingCall: null,
|
||||
callDuration: 0,
|
||||
peerStream: null,
|
||||
localStream: null,
|
||||
isMinimized: false,
|
||||
});
|
||||
},
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user