Compare commits

...

2 Commits

Author SHA1 Message Date
RoyceDa
2b9e28ee4a Исправление системных звуков в звонке
Some checks failed
SP Builds / build (push) Has been cancelled
2026-03-30 19:41:06 +02:00
RoyceDa
d2a506119c Исправление невозможности выбора сообщений в диалоге 2026-03-30 19:37:17 +02:00
3 changed files with 16 additions and 5 deletions

View File

@@ -13,9 +13,7 @@ export function MessageReplyMessages(props: AttachmentProps) {
('showAlertInReplyMessages', true);
const [bgInReplyMessages] = useSetting<string>
('bgInReplyMessages', '');
const reply = JSON.parse(props.attachment.blob);
console.info("Mreply", reply);
const reply = JSON.parse(props.attachment.blob) as MessageReply[];
const closeAlert = () => {
modals.openConfirmModal({

View File

@@ -323,6 +323,13 @@ export function CallProvider(props : CallProviderProps) {
peerConnectionRef.current.onconnectionstatechange = () => {
console.info("Peer connection state changed: " + peerConnectionRef.current?.connectionState);
if(peerConnectionRef.current?.connectionState == "connected"){
/**
* WebRTC соединение установлено, звонок активен, останавливаем все остальные звуки
* системы
*/
stopLoopSound();
stopSound();
setCallState(CallState.ACTIVE);
info("WebRTC connection established, call is active");
}
@@ -432,8 +439,13 @@ export function CallProvider(props : CallProviderProps) {
}
const end = () => {
stopLoopSound();
stopSound();
if(callState == CallState.ACTIVE){
/**
* Только если звонок был активен воспроизводим звуки
*/
stopLoopSound();
stopSound();
}
if (remoteAudioRef.current) {
remoteAudioRef.current.pause();
remoteAudioRef.current.srcObject = null;

View File

@@ -52,6 +52,7 @@ export function useReplyMessages() {
*/
return;
}
replyMessages.messages.push(message);
const sortedByTime = replyMessages.messages.sort((a, b) => a.timestamp - b.timestamp);
setReplyMessages({
publicKey: dialog,