Skip to content

Commit

Permalink
chore: Merge 4.45.0 into master (#5482)
Browse files Browse the repository at this point in the history
  • Loading branch information
diegolmello authored Jan 15, 2024
2 parents 3a10163 + 9109b87 commit 233b858
Show file tree
Hide file tree
Showing 52 changed files with 428 additions and 120 deletions.
3 changes: 2 additions & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode VERSIONCODE as Integer
versionName "4.44.2"
versionName "4.45.0"
vectorDrawables.useSupportLibrary = true
if (!isFoss) {
manifestPlaceholders = [BugsnagAPIKey: BugsnagAPIKey as String]
Expand Down Expand Up @@ -380,6 +380,7 @@ dependencies {
androidTestImplementation('com.wix:detox:+')
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.facebook.soloader:soloader:0.10.4'
implementation 'com.facebook.fresco:animated-gif:2.5.0'
}

if (isNewArchitectureEnabled()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const IncomingCallHeader = React.memo(
({ uid, callId, avatar, roomName }: { callId: string; avatar: string; uid: string; roomName: string }) => {
const [mic, setMic] = useState(true);
const [cam, setCam] = useState(false);
const [audio, setAudio] = useState(true);
const dispatch = useDispatch();
const isMasterDetail = useAppSelector(state => state.app.isMasterDetail);
const styles = useStyle();
Expand Down Expand Up @@ -64,12 +65,20 @@ const IncomingCallHeader = React.memo(
direct={true}
/>
<View style={styles.row}>
<Touchable hitSlop={BUTTON_HIT_SLOP} onPress={hideNotification} style={styles.closeButton}>
<Touchable
hitSlop={BUTTON_HIT_SLOP}
onPress={() => {
setAudio(!audio);
hideNotification();
}}
style={styles.closeButton}
>
<CustomIcon name='close' size={20} color={colors.gray300} />
</Touchable>
<Touchable
hitSlop={BUTTON_HIT_SLOP}
onPress={() => {
setAudio(!audio);
hideNotification();
dispatch(cancelCall({ callId }));
}}
Expand All @@ -80,6 +89,7 @@ const IncomingCallHeader = React.memo(
<Touchable
hitSlop={BUTTON_HIT_SLOP}
onPress={() => {
setAudio(!audio);
hideNotification();
dispatch(acceptCall({ callId }));
}}
Expand All @@ -88,7 +98,7 @@ const IncomingCallHeader = React.memo(
<Text style={styles.buttonText}>{i18n.t('accept')}</Text>
</Touchable>
</View>
<Ringer ringer={ERingerSounds.RINGTONE} />
{audio ? <Ringer ringer={ERingerSounds.RINGTONE} /> : null}
</View>
);
}
Expand Down
41 changes: 17 additions & 24 deletions app/containers/Ringer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,41 +1,34 @@
import { Audio } from 'expo-av';
import React, { useEffect, useRef } from 'react';
import { View } from 'react-native';

export enum ERingerSounds {
DIALTONE = 'dialtone',
RINGTONE = 'ringtone'
}

const Ringer = React.memo(({ ringer }: { ringer: ERingerSounds }) => {
const sound = useRef<Audio.Sound | null>(null);
const sound = useRef(new Audio.Sound());

useEffect(() => {
(async () => {
let expo = null;
switch (ringer) {
case ERingerSounds.DIALTONE:
expo = await Audio.Sound.createAsync(require(`./dialtone.mp3`));
break;
case ERingerSounds.RINGTONE:
expo = await Audio.Sound.createAsync(require(`./ringtone.mp3`));
break;
default:
expo = await Audio.Sound.createAsync(require(`./dialtone.mp3`));
break;
const loadAndPlay = async () => {
try {
const soundFile = ringer === ERingerSounds.DIALTONE ? require(`./dialtone.mp3`) : require(`./ringtone.mp3`);
await sound.current.loadAsync(soundFile);
await sound.current.playAsync();
await sound.current.setIsLoopingAsync(true);
} catch (error) {
console.error('Error loading sound:', error);
}
sound.current = expo.sound;
await sound.current.playAsync();
await sound.current.setIsLoopingAsync(true);
})();
}, []);
};

useEffect(() => () => stopSound(), []);
loadAndPlay();

const stopSound = () => {
sound?.current?.unloadAsync();
};
return () => {
sound.current?.unloadAsync();
};
}, []);

return <View />;
return null;
});

export default Ringer;
4 changes: 3 additions & 1 deletion app/definitions/rest/v1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { CommandsEndpoints } from './commands';
import { PushTokenEndpoints } from './pushToken';
import { DirectoryEndpoint } from './directory';
import { AutoTranslateEndpoints } from './autotranslate';
import { ModerationEndpoints } from './moderation';

export type Endpoints = ChannelsEndpoints &
ChatEndpoints &
Expand All @@ -42,4 +43,5 @@ export type Endpoints = ChannelsEndpoints &
CommandsEndpoints &
PushTokenEndpoints &
DirectoryEndpoint &
AutoTranslateEndpoints;
AutoTranslateEndpoints &
ModerationEndpoints;
5 changes: 5 additions & 0 deletions app/definitions/rest/v1/moderation.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export type ModerationEndpoints = {
'moderation.reportUser': {
POST: (params: { userId: string; description: string }) => void;
};
};
2 changes: 0 additions & 2 deletions app/i18n/locales/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"Avatar_Url": "عنوان ويب الصورة الرمزية",
"Away": "غير متواجد",
"Black": "أسود",
"Block_user": "حظر المستخدم",
"Browser": "المتصفح",
"Busy": "مشغول",
"Cancel_editing": "إلغاء التعديل",
Expand Down Expand Up @@ -372,7 +371,6 @@
"Two_Factor_Authentication": "المصادقة الثنائية",
"unarchive": "إلغاء الأرشفة",
"UNARCHIVE": "إلغاء الأرشفة",
"Unblock_user": "إلغاء حظر عن مستخدم",
"Unfollowed_thread": "موضوع غير متابع",
"Unmute": "إلغاء كتم",
"unmuted": "إلغاء كتم",
Expand Down
2 changes: 0 additions & 2 deletions app/i18n/locales/bn-IN.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
"Avatar_Url": "অবতার URL",
"Away": "দূরে",
"Black": "কালো",
"Block_user": "ব্যবহারকারী ব্লক করুন",
"Browser": "ব্রাউজার",
"Busy": "ব্যস্ত",
"Cancel_editing": "সম্পাদনা বাতিল করুন",
Expand Down Expand Up @@ -405,7 +404,6 @@
"Two_Factor_Authentication": "দুটি ধারণামূলক প্রমাণীকরণ",
"unarchive": "আনআরকাইভ",
"UNARCHIVE": "আনআরকাইভ",
"Unblock_user": "ব্যবহারকারী আনব্লক করুন",
"Unfollowed_thread": "থ্রেড অনফলোয়েড",
"Unmute": "আনমিউট",
"unmuted": "আনমিউটেড",
Expand Down
2 changes: 0 additions & 2 deletions app/i18n/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
"Avatar_Url": "Avatar-URL",
"Away": "Abwesend",
"Black": "Schwarz",
"Block_user": "Benutzer blockieren",
"Browser": "Browser",
"Busy": "Beschäftigt",
"Cancel_editing": "Bearbeitung abbrechen",
Expand Down Expand Up @@ -406,7 +405,6 @@
"Two_Factor_Authentication": "Zwei-Faktor-Authentifizierung",
"unarchive": "wiederherstellen",
"UNARCHIVE": "WIEDERHERSTELLEN",
"Unblock_user": "Benutzer entsperren",
"Unfollowed_thread": "Thread nicht mehr folgen",
"Unmute": "Stummschaltung aufheben",
"unmuted": "Stummschaltung aufgehoben",
Expand Down
7 changes: 5 additions & 2 deletions app/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
"Avatar_Url": "Avatar URL",
"Away": "Away",
"Black": "Black",
"Block_user": "Block user",
"Browser": "Browser",
"Busy": "Busy",
"Cancel_editing": "Cancel editing",
Expand Down Expand Up @@ -407,7 +406,6 @@
"Two_Factor_Authentication": "Two-factor authentication",
"unarchive": "unarchive",
"UNARCHIVE": "UNARCHIVE",
"Unblock_user": "Unblock user",
"Unfollowed_thread": "Unfollowed thread",
"Unmute": "Unmute",
"unmuted": "unmuted",
Expand Down Expand Up @@ -762,6 +760,11 @@
"Enable_writing_in_room": "Enable writing in room",
"Disable_writing_in_room": "Disable writing in room",
"Pinned_a_message": "Pinned a message:",
"Unblock": "Unblock",
"Block": "Block",
"Report_user": "Report user",
"Report_sent_successfully": "Report sent successfully",
"Why_do_you_want_to_report": "Why do you want to report?",
"You_dont_have_permission_to_perform_this_action": "You don’t have permission to perform this action. Check with a workspace administrator.",
"Jump_to_message": "Jump to message",
"Missed_call": "Missed call"
Expand Down
2 changes: 0 additions & 2 deletions app/i18n/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
"Avatar_Url": "URL del Avatar",
"Away": "Ausente",
"Black": "Negro",
"Block_user": "Bloquear usuario",
"Busy": "Ocupado",
"Cancel_editing": "Cancelar edición",
"Cancel_recording": "Cancelar grabación",
Expand Down Expand Up @@ -239,7 +238,6 @@
"Two_Factor_Authentication": "Autenticación de doble factor",
"unarchive": "desarchivar",
"UNARCHIVE": "DESARCHIVAR",
"Unblock_user": "Desbloquear usuario",
"Unfollowed_thread": "Dejar de seguir el hilo",
"Unmute": "Desmutear",
"unmuted": "Desmuteado",
Expand Down
2 changes: 0 additions & 2 deletions app/i18n/locales/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
"Avatar_Url": "Avatarin URL-osoite",
"Away": "Poissa",
"Black": "Musta",
"Block_user": "Estä käyttäjä",
"Browser": "Selain",
"Busy": "Varattu",
"Cancel_editing": "Peruuta muokkaus",
Expand Down Expand Up @@ -406,7 +405,6 @@
"Two_Factor_Authentication": "Kaksivaiheinen tunnistautuminen",
"unarchive": "palauta arkistosta",
"UNARCHIVE": "PALAUTA ARKISTOSTA",
"Unblock_user": "Poista käyttäjän esto",
"Unfollowed_thread": "Lopetettiin ketjun seuraaminen",
"Unmute": "Mykistys poistettu",
"unmuted": "poisti mykistyksen",
Expand Down
2 changes: 0 additions & 2 deletions app/i18n/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
"Avatar_Url": "URL de l'avatar",
"Away": "Absent",
"Black": "Noir",
"Block_user": "Bloquer l'utilisateur",
"Browser": "Navigateur",
"Busy": "Occupé",
"Cancel_editing": "Annuler la modification",
Expand Down Expand Up @@ -381,7 +380,6 @@
"Two_Factor_Authentication": "Authentification à deux facteurs",
"unarchive": "désarchiver",
"UNARCHIVE": "DÉSARCHIVER",
"Unblock_user": "Débloquer l'utilisateur",
"Unfollowed_thread": "Ne plus suivre ce fil",
"Unmute": "Rendre la parole",
"unmuted": "rendu la parole",
Expand Down
2 changes: 0 additions & 2 deletions app/i18n/locales/hi-IN.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
"Avatar_Url": "अवतार URL",
"Away": "दूर",
"Black": "काला",
"Block_user": "उपयोगकर्ता को ब्लॉक करें",
"Browser": "ब्राउज़र",
"Busy": "व्यस्त",
"Cancel_editing": "संपादन रद्द करें",
Expand Down Expand Up @@ -405,7 +404,6 @@
"Two_Factor_Authentication": "दो-क्रमिक प्रमाणीकरण",
"unarchive": "अनारकाइव",
"UNARCHIVE": "अनारकाइव करें",
"Unblock_user": "उपयोगकर्ता को अनब्लॉक करें",
"Unfollowed_thread": "थ्रेड का अनुसरण नहीं किया गया",
"Unmute": "आवाज़ हटाएं",
"unmuted": "आवाज़ हटाई गई",
Expand Down
2 changes: 0 additions & 2 deletions app/i18n/locales/hu.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
"Avatar_Url": "Avatar URL",
"Away": "Távol",
"Black": "Fekete",
"Block_user": "Felhasználó tiltása",
"Browser": "Böngésző",
"Busy": "Elfoglalt",
"Cancel_editing": "Szerkesztés megszakítás",
Expand Down Expand Up @@ -406,7 +405,6 @@
"Two_Factor_Authentication": "Kétfaktoros hitelesítés",
"unarchive": "Archiválás megszüntetés",
"UNARCHIVE": "ARCHIVÁLÁS MEGSZÜNTETÉS",
"Unblock_user": "Felhasználó tiltás feloldása",
"Unfollowed_thread": "Nem követett szál",
"Unmute": "Némítás megszüntetése",
"unmuted": "Némítás megszüntetve",
Expand Down
2 changes: 0 additions & 2 deletions app/i18n/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
"Avatar_Url": "URL avatar",
"Away": "Assente",
"Black": "Nero",
"Block_user": "Blocca utente",
"Browser": "Browser",
"Busy": "Occupato",
"Cancel_editing": "Annulla modifica",
Expand Down Expand Up @@ -386,7 +385,6 @@
"Two_Factor_Authentication": "Autenticazione a due fattori",
"unarchive": "rimuovi dall'archivio",
"UNARCHIVE": "RIMUOVI DALL'ARCHIVIO",
"Unblock_user": "Sblocca utente",
"Unfollowed_thread": "Non segui più il thread",
"Unmute": "Attiva notifiche",
"unmuted": "notifiche attivate",
Expand Down
2 changes: 0 additions & 2 deletions app/i18n/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
"Avatar_Url": "アバターURL",
"Away": "退出中",
"Black": "ブラック",
"Block_user": "ブロックしたユーザー",
"Browser": "ブラウザ",
"Busy": "取り込み中",
"Cancel_editing": "編集をキャンセル",
Expand Down Expand Up @@ -334,7 +333,6 @@
"Two_Factor_Authentication": "2段階認証",
"unarchive": "アーカイブ解除",
"UNARCHIVE": "アーカイブ解除",
"Unblock_user": "ブロックを解除",
"Unfollowed_thread": "スレッド更新時に通知しない",
"Unmute": "ミュート解除",
"unmuted": "ミュート解除しました",
Expand Down
2 changes: 0 additions & 2 deletions app/i18n/locales/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
"Avatar_Url": "Avatar-URL",
"Away": "Afwezig",
"Black": "Zwart",
"Block_user": "Blokkeer gebruiker",
"Browser": "Browser",
"Busy": "Bezig",
"Cancel_editing": "Bewerken annuleren",
Expand Down Expand Up @@ -381,7 +380,6 @@
"Two_Factor_Authentication": "Twee-factor authenticatie",
"unarchive": "dearchiveren",
"UNARCHIVE": "DEARCHIVEREN",
"Unblock_user": "Deblokkeer gebruiker",
"Unfollowed_thread": "Draad ontvolgd",
"Unmute": "Dempen opheffen",
"unmuted": "ongedempt",
Expand Down
7 changes: 5 additions & 2 deletions app/i18n/locales/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
"Avatar_Url": "Avatar URL",
"Away": "Ausente",
"Black": "Preto",
"Block_user": "Bloquear usuário",
"Browser": "Navegador",
"Busy": "Ocupado",
"Cancel_editing": "Cancelar edição",
Expand Down Expand Up @@ -407,7 +406,6 @@
"Two_Factor_Authentication": "Autenticação de dois fatores",
"unarchive": "desarquivar",
"UNARCHIVE": "DESARQUIVAR",
"Unblock_user": "Desbloquear usuário",
"Unfollowed_thread": "Parou de seguir tópico",
"Unmute": "Permitir que o usuário fale",
"unmuted": "permitiu que o usuário fale",
Expand Down Expand Up @@ -761,6 +759,11 @@
"The_user_will_be_able_to_type_in_roomName": "O usuário poderá digitar em {{roomName}}",
"Enable_writing_in_room": "Permitir escrita na sala",
"Disable_writing_in_room": "Desabilitar escrita na sala",
"Unblock": "Desbloquear",
"Block": "Bloquear",
"Report_user": "Reportar usuário",
"Report_sent_successfully": "Reporte enviado com sucesso",
"Why_do_you_want_to_report": "Por que você deseja reportar?",
"Pinned_a_message": "Fixou uma mensagem:",
"You_dont_have_permission_to_perform_this_action": "Você não tem permissão para realizar esta ação. Verifique com um administrador do espaço de trabalho.",
"Jump_to_message": "Ir para mensagem",
Expand Down
2 changes: 0 additions & 2 deletions app/i18n/locales/pt-PT.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"Avatar_Url": "URL do Avatar",
"Away": "Ausente",
"Black": "Preto",
"Block_user": "Bloquear utilizador",
"Browser": "Navegador",
"Busy": "Ocupado",
"Cancel_editing": "Cancelar edição",
Expand Down Expand Up @@ -323,7 +322,6 @@
"Two_Factor_Authentication": "Autenticação 2FA",
"unarchive": "desarquivar",
"UNARCHIVE": "DESARQUIVAR",
"Unblock_user": "Desbloquear utilizador",
"Unmute": "Retirar silêncio",
"unmuted": "silêncio removido",
"Unpin": "Desafixar",
Expand Down
Loading

0 comments on commit 233b858

Please sign in to comment.