feat(chat): enhance chat settings and message bubble styles
- Introduced dynamic chat settings for font size and message bubble radius, improving user customization. - Updated ChatScreen styles to support dynamic themes and responsive layouts. - Refactored bubble styles to utilize dynamic properties for better visual consistency. - Simplified chat settings management by integrating Zustand store for state management. This update significantly enhances the chat interface and user experience by allowing personalized settings and improved visual elements.
This commit is contained in:
@@ -8,7 +8,7 @@ import {
|
||||
WSErrorMessage,
|
||||
} from '../services/wsService';
|
||||
import { webrtcManager, ICEServer } from '../services/webrtc';
|
||||
import { useAuthStore } from './authStore';
|
||||
import { getCurrentUserId } from './sessionStore';
|
||||
import { useUserStore } from './userStore';
|
||||
import { userManager } from './userManager';
|
||||
|
||||
@@ -444,7 +444,7 @@ export const callStore = create<CallState>((set, get) => ({
|
||||
callTimeoutTimer = null;
|
||||
}
|
||||
|
||||
const myUserId = useAuthStore.getState().currentUser?.id || '';
|
||||
const myUserId = getCurrentUserId() || '';
|
||||
|
||||
try {
|
||||
const isVideoCall = currentCall.callType === 'video';
|
||||
@@ -555,7 +555,7 @@ export const callStore = create<CallState>((set, get) => ({
|
||||
const { currentCall } = get();
|
||||
if (!currentCall || currentCall.id !== msg.call_id) return;
|
||||
|
||||
const myUserId = useAuthStore.getState().currentUser?.id || '';
|
||||
const myUserId = getCurrentUserId() || '';
|
||||
if (msg.from_id === myUserId) return;
|
||||
|
||||
if (msg.payload.sdp_type === 'offer') {
|
||||
@@ -571,7 +571,7 @@ export const callStore = create<CallState>((set, get) => ({
|
||||
const { currentCall } = get();
|
||||
if (!currentCall || currentCall.id !== msg.call_id) return;
|
||||
|
||||
const myUserId = useAuthStore.getState().currentUser?.id || '';
|
||||
const myUserId = getCurrentUserId() || '';
|
||||
if (msg.from_id === myUserId) return;
|
||||
|
||||
try {
|
||||
@@ -616,7 +616,7 @@ export const callStore = create<CallState>((set, get) => ({
|
||||
return;
|
||||
}
|
||||
|
||||
const myUserId = useAuthStore.getState().currentUser?.id;
|
||||
const myUserId = getCurrentUserId();
|
||||
if (!myUserId) {
|
||||
console.error('[CallStore] Not logged in');
|
||||
return;
|
||||
@@ -681,7 +681,7 @@ export const callStore = create<CallState>((set, get) => ({
|
||||
|
||||
const isVideoCall = incomingCall.callType === 'video';
|
||||
console.log('[CallStore] acceptCall, isVideoCall:', isVideoCall);
|
||||
const myUserId = useAuthStore.getState().currentUser?.id || '';
|
||||
const myUserId = getCurrentUserId() || '';
|
||||
|
||||
set({
|
||||
currentCall: {
|
||||
|
||||
Reference in New Issue
Block a user