feat(profile): add chat settings and language options to profile settings
All checks were successful
Frontend CI / ota-android (push) Successful in 13m7s
Frontend CI / build-and-push-web (push) Successful in 16m58s
Frontend CI / build-android-apk (push) Successful in 1h4m18s

- 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:
lafay
2026-04-01 02:17:36 +08:00
parent 20e9d69540
commit 5614b4078a
25 changed files with 2622 additions and 801 deletions

View File

@@ -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,
});
},
}));