Merge pull request #6700 from vector-im/release/1.9.4/release

Release 1.9.4
This commit is contained in:
ismailgulek 2022-09-09 11:07:08 +03:00 committed by GitHub
commit 3d6d363cc6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 87 additions and 156 deletions

View file

@ -1,10 +1,11 @@
name: UI Tests CI
on:
# Triggers the workflow on any pull request
push:
branches: [ develop ]
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:

View file

@ -1,3 +1,15 @@
## Changes in 1.9.4 (2022-09-09)
✨ Features
- Create DM room only on first message - Create the DM and navigate to the new room after sending an event ([#5864](https://github.com/vector-im/element-ios/issues/5864))
🐛 Bugfixes
- Fix composer expansion on Start DM as you enter the message in deferred mode. ([#6689](https://github.com/vector-im/element-ios/issues/6689))
- [Group DM] send a new message in an existing DM invite again one of left member. ([#6691](https://github.com/vector-im/element-ios/issues/6691))
## Changes in 1.9.3 (2022-09-07)
✨ Features

View file

@ -15,5 +15,5 @@
//
// Version
MARKETING_VERSION = 1.9.3
CURRENT_PROJECT_VERSION = 1.9.3
MARKETING_VERSION = 1.9.4
CURRENT_PROJECT_VERSION = 1.9.4

View file

@ -1,11 +1,11 @@
"NSContactsUsageDescription" = "سيعَرض إيليمنت جِهات الاتصال الخاصّة بِك حَتى تتمَكَّنَ من دَعوتهم للمُحادثَة.";
"NSContactsUsageDescription" = "ستتم مشاركتها مع خادِم الهُويَّة الخاص بك للمساعدة في العثور على جهات الاتصال الخاصة بك على Matrix.";
"NSFaceIDUsageDescription" = "يُستخدَم خاصية التعرف على الوجه لِلوُصُول إلى التَّطبيق الخاصّ بِك.";
"NSCalendarsUsageDescription" = "اطَّلِع عَلَى اِجتِماعاتِك المُجَدوَلَة في التَّطبيق.";
"NSMicrophoneUsageDescription" = "يحتاجَ إيليمنت الوُصول إلى المِيكرُوفُون لإجراء المُكالمات واستِقبالها، والتِقاط مقاطَع الفيدِيو، وتَسجيل الرسائل الصَوتية.";
// Permissions usage explanations
"NSCameraUsageDescription" = "تُستَخدَم الكاميرا لاِلتِقاط الصُّوَر، المَقاطِع المَرئيَّة وإجراءُ مُكالَمَةٍ مَرئيَّة.";
"NSPhotoLibraryUsageDescription" = "مَكتَبَة الصُّوَر تُستَخدَم لإرسال الصُّوَر وَالمَقاطِع المَرئيَّة.";
"NSCameraUsageDescription" = "تُستَخدَم الكاميرا لإجراء المُكالَمات المَرئَّية، أو لاِلتِقاط ورفع الصُّوَر والمَقاطِع المَرئيَّة.";
"NSPhotoLibraryUsageDescription" = "السماح بالوصول إلى الصُّوَر لرفع الصُّوَر وَالمَقاطِع المَرئيَّة من المَكتَبَة الخاصة بك.";
"NSLocationWhenInUseUsageDescription" = "عِندَما تَشارَكَ مَوقِعك مَعَ أشَخاص آخرين، سيحتاجَ إيليمنت إلى الصلاحية لإظهار الخَريطة لهم.";
"NSLocationAlwaysAndWhenInUseUsageDescription" = "إذاما شاركت موقعك مع أشخاص آخرين, فسيحتاج إيليمنت الصلاحية لإظهار خريطة لهم.";

View file

@ -1,8 +1,8 @@
// Permissions usage explanations
"NSCameraUsageDescription" = "Die Kamera wird verwendet, um Fotos und Videos aufzunehmen sowie Videoanrufe durchzuführen.";
"NSPhotoLibraryUsageDescription" = "Die Fotobibliothek wird verwendet, um Fotos und Videos zu versenden.";
"NSCameraUsageDescription" = "Die Kamera wird verwendet, um Videoanrufe zu machen, oder Fotos aufzunehmen und hochzuladen.";
"NSPhotoLibraryUsageDescription" = "Erlaube den Zugriff auf die Fotos um Fotos und Videos aus deiner Bibliothek hochzuladen.";
"NSMicrophoneUsageDescription" = "Element benötigt Zugriff auf das Mikrofon um Anrufe zu tätigen und Videos oder Sprachnachrichten aufzunehmen.";
"NSContactsUsageDescription" = "Element zeigt deine Kontakte an, damit du sie zum chatten einladen kannst.";
"NSContactsUsageDescription" = "Deine Kontakte werden mit deinem Identitätsserver geteilt, um dir zu helfen deine Kontakte auf Matrix zu finden.";
"NSCalendarsUsageDescription" = "Sieh dir deine geplanten Meetings in der App an.";
"NSFaceIDUsageDescription" = "Face-ID wird zum Zugriff auf deine App verwendet.";
"NSLocationWhenInUseUsageDescription" = "Wenn du deinen Standort mit Personen teilst, braucht Element Zugriff um ihnen eine Karte anzuzeigen.";

View file

@ -1,9 +1,9 @@
// Permissions usage explanations
"NSCameraUsageDescription" = "Kaameraga salvestatakse pilte ning videosid ja tehakse videokõnesid.";
"NSPhotoLibraryUsageDescription" = "Fotogaleriid kasutatakse fotode ja videote saatmiseks teistele kasutajatele.";
"NSCameraUsageDescription" = "Kaameraga tehakse videokõnesid, salvestatakse ja laaditakse võrku pilte ning videosid.";
"NSPhotoLibraryUsageDescription" = "Luba ligipääs oma meediapangale fotode ja videote laadimiseks võrku.";
"NSMicrophoneUsageDescription" = "Kõnede tegemiseks, videote ja häälsõnumite salvestamiseks vajab Element ligipääsu sinu seadme mikrofonile.";
"NSCalendarsUsageDescription" = "Vaata päevakavasse lisatud koosolekuid vastvast rakendusest.";
"NSContactsUsageDescription" = "Element näitab sulle tuttavaid, kellega saad alustada vestlust.";
"NSContactsUsageDescription" = "Tuttavate leidmiseks Matrix'i võrgust jagatakse seda teavet sinu seadistatud isikutuvastusserveriga.";
"NSFaceIDUsageDescription" = "Ligipääsuks sinu rakendusele on kasutusel Face ID.";
"NSLocationWhenInUseUsageDescription" = "Kui sa jagad teiste kasutajatega oma asukohta, siis Element vajab õigusi asukoha kuvamiseks kaardil.";
"NSLocationAlwaysAndWhenInUseUsageDescription" = "Kui sa jagad teiste kasutajatega oma asukohta, siis Element vajab õigusi asukoha kuvamiseks kaardil.";

View file

@ -1,8 +1,8 @@
// Permissions usage explanations
"NSCameraUsageDescription" = "Lappareil photo est utilisé pour prendre des photos, des vidéos et pour passer des appels vidéo.";
"NSPhotoLibraryUsageDescription" = "La photothèque est utilisée pour envoyer des photos et des vidéos.";
"NSCameraUsageDescription" = "Lappareil photo est utilisé les appels vidéo ainsi que prendre et envoyer des photos et vidéos.";
"NSPhotoLibraryUsageDescription" = "Autorisez laccès à la photothèque pour envoyer des photos et des vidéos.";
"NSMicrophoneUsageDescription" = "Element doit avoir accès au microphone pour passer des appels, capturer des vidéos et enregistrer des messages vocaux.";
"NSContactsUsageDescription" = "Element affichera vos contacts pour que vous puissiez les inviter à parler.";
"NSContactsUsageDescription" = "Ils seront partagés avec votre serveur didentité pour que vous puissiez inviter vos contacts à utiliser Matrix.";
"NSCalendarsUsageDescription" = "Voir vos rendez-vous dans lapplication.";
"NSFaceIDUsageDescription" = "Face ID est utilisé pour accéder à votre application.";
"NSLocationWhenInUseUsageDescription" = "Element doit accéder à votre emplacement pour vous permettre de la partager aux autres utilisateurs sur une carte.";

View file

@ -2496,7 +2496,7 @@
// Mark: - All Chats
"all_chats_title" = "Toutes les discussions";
"all_chats_title" = "Tous mes chats";
"spaces_subspace_creation_visibility_message" = "Lespace créé sera ajouté à %@.";
"spaces_subspace_creation_visibility_title" = "Quel type de sous-espace voulez-vous créer ?";
"spaces_explore_rooms_format" = "Parcourir %@";

View file

@ -1,8 +1,8 @@
// Permissions usage explanations
"NSCameraUsageDescription" = "A kamera fényképek, videók készítéséhez és videóhívásokhoz lesz használva.";
"NSPhotoLibraryUsageDescription" = "A fénykép galéria fényképek és videók küldéséhez lesz használva.";
"NSCameraUsageDescription" = "A kamera videóhívásokhoz vagy fényképek, videók feltöltéséhez szükséges.";
"NSPhotoLibraryUsageDescription" = "Hozzáférés a fényképekhez a galériából fényképek és videók küldése miatt szükséges.";
"NSMicrophoneUsageDescription" = "A hívás indításához és fogadásához, videó és hangüzenet felvételéhez az Elementnek hozzáférési engedélyre van szüksége a mikrofonhoz.";
"NSContactsUsageDescription" = "Element megmutatja a névjegyzéket, hogy beszélgetésbe meghívhasd őket.";
"NSContactsUsageDescription" = "Megosztásra kerül az azonosítási szerverrel barátok Matrixon való megtalálásához.";
"NSCalendarsUsageDescription" = "Nézd meg a találkozóidat az alkalmazásban.";
"NSFaceIDUsageDescription" = "Arc felismerés használata az alkalmazás eléréséhez.";
"NSLocationWhenInUseUsageDescription" = "Ha megosztod másokkal a földrajzi helyzetedet, akkor az Elementnek hozzáférésre van szüksége a térképen való megjelenítéshez.";

View file

@ -1,11 +1,11 @@
"NSContactsUsageDescription" = "Element akan menampilkan kontak Anda supaya Anda bisa mengundang mereka ke obrolan.";
"NSContactsUsageDescription" = "Mereka akan dibagikan dengan server identitas Anda untuk membantu mencari kontak Anda di Matrix.";
// Permissions usage explanations
"NSCameraUsageDescription" = "Kamera digunakan untuk mengambil foto dan video, dan melakukan panggilan video.";
"NSCameraUsageDescription" = "Kamera digunakan untuk melakukan panggilan video, atau mengambil dan mengunggah foto dan video.";
"NSFaceIDUsageDescription" = "Face ID digunakan untuk mengakses aplikasi Anda.";
"NSCalendarsUsageDescription" = "Lihat pertemuan yang sudah dijadwalkan di aplikasi.";
"NSMicrophoneUsageDescription" = "Element membutuhkan akses ke mikrofon Anda untuk melakukan dan menerima panggilan, mengambil video, dan merekam pesan suara.";
"NSPhotoLibraryUsageDescription" = "Galeri digunakan untuk mengirim foto dan video.";
"NSPhotoLibraryUsageDescription" = "Perbolehkan pengaksesan ke foto untuk mengunggah foto dan video dan pustaka Anda.";
"NSLocationWhenInUseUsageDescription" = "Ketika Anda membagikan lokasi Anda ke orang-orang, Element membutuhkan akses untuk menampilkan mereka sebuah peta.";
"NSLocationAlwaysAndWhenInUseUsageDescription" = "Ketika Anda membagikan lokasi Anda kepada seseorang, Element membutuhkan akses untuk menampilkan mereka sebuah peta.";

View file

@ -1,8 +1,8 @@
// Permissions usage explanations
"NSCameraUsageDescription" = "La fotocamera viene utilizzata per scattare fotografie, registrare video ed eseguire videochiamate.";
"NSPhotoLibraryUsageDescription" = "La libreria fotografica viene utilizzata per inviare foto e video.";
"NSCameraUsageDescription" = "La fotocamera viene usata per fare videochiamate, o scattare/registrare e inviare foto e video.";
"NSPhotoLibraryUsageDescription" = "Consenti l'accesso alle foto per inviare foto e video dalla tua libreria.";
"NSMicrophoneUsageDescription" = "Element ha bisogno di accedere al microfono per effettuare e ricevere chiamate, registrare video e messaggi vocali.";
"NSContactsUsageDescription" = "Element mostrerà i tuoi contatti così da poterli invitare in chat.";
"NSContactsUsageDescription" = "Verranno condivisi con il tuo server d'identità per aiutarti a trovare i tuoi contatti su Matrix.";
"NSCalendarsUsageDescription" = "Vedi le tue riunioni programmate nell'app.";
"NSFaceIDUsageDescription" = "Face ID viene usato per accedere all'app.";
"NSLocationWhenInUseUsageDescription" = "Quando condividi la tua posizione con altre persone, Element richiede l'accesso per mostrare loro una mappa.";

View file

@ -15,10 +15,10 @@
*/
// Permissions usage explanations
"NSCameraUsageDescription" = "De camera wordt gebruikt om fotos en videos te maken, en voor videogesprekken.";
"NSPhotoLibraryUsageDescription" = "De fotogalerij wordt gebruikt om fotos en videos te versturen.";
"NSCameraUsageDescription" = "De camera wordt gebruikt om te videobellen, of om foto's en video's te maken en te uploaden.";
"NSPhotoLibraryUsageDescription" = "Geef toegang tot foto's om foto's en video's uit uw bibliotheek te uploaden.";
"NSMicrophoneUsageDescription" = "Element heeft toegang nodig tot uw microfoon nodig voor oproepen, maken van video's en spraakberichten opnemen.";
"NSContactsUsageDescription" = "Element zal uw contacten tonen zodat u ze kunt uitnodigen om te chatten.";
"NSContactsUsageDescription" = "Ze worden gedeeld met uw identiteitsserver om uw contacten op Matrix te vinden.";
"NSCalendarsUsageDescription" = "Bekijk uw geplande afspraken in de app.";
"NSFaceIDUsageDescription" = "Face ID wordt gebruikt om toegang te krijgen tot uw app.";
"NSLocationWhenInUseUsageDescription" = "Wanneer u uw locatie deelt met mensen heeft Element toegang nodig om dit op een kaart te tonen.";

View file

@ -1,8 +1,8 @@
// Permissions usage explanations
"NSCameraUsageDescription" = "Kamera wykorzystywana jest do robienia zdjęć, nagrywania filmów i prowadzenia rozmów wideo.";
"NSPhotoLibraryUsageDescription" = "Biblioteka zdjęć wykorzystywana jest do wysyłania zdjęć i filmów.";
"NSCameraUsageDescription" = "Aparat wykorzystywany jest do prowadzenia rozmów wideo, robienia zdjęć i nagrywania filmów.";
"NSPhotoLibraryUsageDescription" = "Zezwól na dostęp do zdjęć, aby wysyłać zdjęcia i filmy z twojej biblioteki.";
"NSMicrophoneUsageDescription" = "Element musi mieć dostęp do mikrofonu, aby wykonywać i odbierać połączenia, nagrywać filmy i nagrywać wiadomości głosowe.";
"NSContactsUsageDescription" = "Element pokaże Twoje kontakty, dzięki czemu możesz je zaprosić do czatu.";
"NSContactsUsageDescription" = "Zostaną one udostępnione twojemu serwerowi tożsamości, aby ułatwić ci znalezienie kontaktów w sieci Matrix.";
"NSCalendarsUsageDescription" = "Zobacz swoje zaplanowane spotkania w aplikacji.";
"NSFaceIDUsageDescription" = "Face ID wykorzystywane jest do odblokowywania aplikacji.";
"NSLocationWhenInUseUsageDescription" = "Gdy udostępniasz innym swoją lokalizację, Element potrzebuje dostępu, aby pokazać im mapę.";

View file

@ -1,8 +1,8 @@
// Permissions usage explanations
"NSCameraUsageDescription" = "A câmera é usada para tirar fotos e vídeos, fazer chamadas de vídeo.";
"NSPhotoLibraryUsageDescription" = "A biblioteca de fotos é usada para enviar fotos e vídeos.";
"NSCameraUsageDescription" = "A câmera é usada para fazer chamadas de vídeo, ou tirar e fazer upload de fotos e vídeos.";
"NSPhotoLibraryUsageDescription" = "Permita acesso a fotos para fazer upload de fotos e vídeos de sua biblioteca.";
"NSMicrophoneUsageDescription" = "Element precisa acessar seu microfone para fazer e receber chamadas, tirar vídeos, e gravar mensagens de voz.";
"NSContactsUsageDescription" = "Element vai mostrar seus contatos para que você possa convidá-los a conversar.";
"NSContactsUsageDescription" = "Eles vão ser compartilhados com seu servidor de identidade para ajudar a encontrar seus contatos em Matrix.";
"NSCalendarsUsageDescription" = "Ver suas reuniões agendadas no app.";
"NSFaceIDUsageDescription" = "Face ID é usada para acessar seu app.";
"NSLocationWhenInUseUsageDescription" = "Quando você compartilha sua localização para pessoas, Element precisa de acesso para mostrar-lhes um mapa.";

View file

@ -2,10 +2,10 @@
"NSFaceIDUsageDescription" = "Face ID sa používa na prístup k aplikácii.";
"NSCalendarsUsageDescription" = "Zobrazte svoje naplánované stretnutia v aplikácii.";
"NSContactsUsageDescription" = "Element zobrazí vaše kontakty, aby ste ich mohli pozvať do chatu.";
"NSContactsUsageDescription" = "Budú zdieľané s vaším serverom identity, aby ste mohli nájsť svoje kontakty v službe Matrix.";
"NSMicrophoneUsageDescription" = "Element potrebuje prístup k mikrofónu, aby mohol uskutočňovať a prijímať hovory, nahrávať videá a hlasové správy.";
"NSPhotoLibraryUsageDescription" = "Knižnica fotografií sa používa na odosielanie fotografií a videí.";
"NSPhotoLibraryUsageDescription" = "Povoľte prístup k fotografiám a nahrávajte fotografie a videá z vašej knižnice.";
// Permissions usage explanations
"NSCameraUsageDescription" = "Fotoaparát sa používa na snímanie fotografií a videí, uskutočňovanie videohovorov.";
"NSCameraUsageDescription" = "Fotoaparát sa používa na uskutočňovanie videohovorov alebo na snímanie a odosielanie fotografií a videí.";
"NSLocationWhenInUseUsageDescription" = "Keď zdieľate svoju polohu s ľuďmi, Element potrebuje prístup, aby im mohol zobraziť mapu.";
"NSLocationAlwaysAndWhenInUseUsageDescription" = "Keď zdieľate svoju polohu s ľuďmi, Element potrebuje prístup, aby im mohol zobraziť mapu.";

View file

@ -1,8 +1,8 @@
// Permissions usage explanations
"NSCameraUsageDescription" = "Камера використовується для знімків фото і відео, а також для відео-викликів.";
"NSPhotoLibraryUsageDescription" = "Фотографії використовуються для надсилання фото і відео.";
"NSCameraUsageDescription" = "Камера використовується для здійснення відеовикликів, запису або вивантаження знімків і відео.";
"NSPhotoLibraryUsageDescription" = "Надайте доступ до фотографій, щоб вивантажувати знімки та відео зі своєї бібліотеки.";
"NSMicrophoneUsageDescription" = "Element потребує доступу до вашого мікрофона, щоб здійснювати та отримувати виклики, знімати відео та записувати голосові повідомлення.";
"NSContactsUsageDescription" = "Element покаже ваші контакти, щоб ви могли запросити їх до бесіди.";
"NSContactsUsageDescription" = "Вони будуть передані вашому серверу ідентифікації, щоб допомогти знайти ваші контакти на Matrix.";
"NSCalendarsUsageDescription" = "Переглядайте свої заплановані зустрічі в додатку.";
"NSFaceIDUsageDescription" = "Face ID використовується для доступу до вашого додатку.";
"NSLocationWhenInUseUsageDescription" = "Коли ви надсилаєте комусь дані про своє місцеперебування, Element потребує дозволу, щоб показати їм карту.";

View file

@ -1,8 +1,8 @@
// Permissions usage explanations
"NSCameraUsageDescription" = "摄像头权限用于拍摄照片、录制视频或进行视频聊天。";
"NSPhotoLibraryUsageDescription" = "照片库访问权限用于发送图片与视频。";
"NSCameraUsageDescription" = "摄像头用于视频通话,或者拍摄和上传照片和视频。";
"NSPhotoLibraryUsageDescription" = "授予照片访问权以上传你库里的照片和视频。";
"NSMicrophoneUsageDescription" = "Element 需要访问您的麦克风才能拨打和接听电话、拍摄视频和录制语音消息。";
"NSContactsUsageDescription" = "Element 将显示您的联系人,以便您可以邀请他们聊天。";
"NSContactsUsageDescription" = "将与你的身份服务器共享他们以帮助发现你Matrix上的联系人。";
"NSCalendarsUsageDescription" = "在此应用中查看你计划的会议。";
"NSFaceIDUsageDescription" = "Face ID 权限用于访问您的应用。";
"NSLocationAlwaysAndWhenInUseUsageDescription" = "当你分享你的位置给人们的时候Element需要权限以显示地图。";

View file

@ -93,7 +93,6 @@ static const int kThreadListBarButtonItemTag = 99;
static UIEdgeInsets kThreadListBarButtonItemContentInsetsNoDot;
static UIEdgeInsets kThreadListBarButtonItemContentInsetsDot;
static CGSize kThreadListBarButtonItemImageSize;
NSString *const RoomViewControllerErrorDomain = @"RoomViewControllerErrorDomain";
@interface RoomViewController () <UISearchBarDelegate, UIGestureRecognizerDelegate, UIScrollViewAccessibilityDelegate, RoomTitleViewTapGestureDelegate, MXKRoomMemberDetailsViewControllerDelegate, ContactsTableViewControllerDelegate, MXServerNoticesDelegate, RoomContextualMenuViewControllerDelegate,
ReactionsMenuViewModelCoordinatorDelegate, EditHistoryCoordinatorBridgePresenterDelegate, MXKDocumentPickerPresenterDelegate, EmojiPickerCoordinatorBridgePresenterDelegate,
@ -1333,9 +1332,9 @@ NSString *const RoomViewControllerErrorDomain = @"RoomViewControllerErrorDomain"
- (void)sendTextMessage:(NSString*)msgTxt
{
// Create or invite again the left member before sending the message in case of a discussion (direct chat)
// Create before sending the message in case of a discussion (direct chat)
MXWeakify(self);
[self createOrRestoreDiscussionIfNeeded:^(BOOL readyToSend) {
[self createDiscussionIfNeeded:^(BOOL readyToSend) {
MXStrongifyAndReturnIfNil(self);
if (readyToSend)
{
@ -1513,93 +1512,6 @@ NSString *const RoomViewControllerErrorDomain = @"RoomViewControllerErrorDomain"
#pragma mark - Start DM
/**
Check whether the current room is a direct chat left by the other member.
*/
- (void)isDirectChatLeftByTheOther:(void (^)(BOOL isEmptyDirect, NSError *error))onComplete
{
// In the case of a direct chat, we check if the other member has left the room.
if (self.roomDataSource)
{
NSString *directUserId = self.roomDataSource.room.directUserId;
if (directUserId)
{
[self.roomDataSource.room members:^(MXRoomMembers *roomMembers) {
MXRoomMember *directUserMember = [roomMembers memberWithUserId:directUserId];
if (directUserMember)
{
MXMembership directUserMembership = directUserMember.membership;
if (directUserMembership != MXMembershipJoin && directUserMembership != MXMembershipInvite)
{
onComplete(YES, nil);
}
else
{
onComplete(NO, nil);
}
}
else
{
MXLogDebug(@"[RoomViewController] isEmptyDirectChat: the direct user has disappeared");
onComplete(YES, nil);
}
} failure:^(NSError *error) {
MXLogDebug(@"[RoomViewController] isEmptyDirectChat: cannot get all room members");
onComplete(NO, error);
}];
return;
}
// This is not a direct chat
onComplete(NO, nil);
} else {
NSError* error = [NSError errorWithDomain:RoomViewControllerErrorDomain
code:0
userInfo:@{ NSLocalizedDescriptionKey: [VectorL10n errorCommonMessage] }];
// Stop the current process
onComplete(NO, error);
}
}
/**
Check whether the current room is a direct chat left by the other member.
In this case, this method will invite again the left member.
*/
- (void)restoreDiscussionIfNeeded:(void (^)(BOOL readyToSend))onComplete
{
[self isDirectChatLeftByTheOther:^(BOOL isEmptyDirect, NSError *error) {
if (error != nil) {
MXLogDebug(@"[RoomViewController] restoreDiscussionIfNeeded: isDirectChatLeftByTheOther finished with error : %@ ", error.localizedDescription);
[self showError:error];
onComplete(NO);
} else if (isEmptyDirect) {
NSString *directUserId = self.roomDataSource.room.directUserId;
MXWeakify(self);
MXLogDebug(@"[RoomViewController] restoreDiscussionIfNeeded: check left member %@", directUserId);
// Invite again the direct user
MXStrongifyAndReturnIfNil(self);
MXLogDebug(@"[RoomViewController] restoreDiscussionIfNeeded: invite again %@", directUserId);
[self.roomDataSource.room inviteUser:directUserId success:^{
// Delay the completion in order to display the invite before the local echo of the new message.
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
onComplete(YES);
});
} failure:^(NSError *error) {
MXLogDebug(@"[RoomViewController] restoreDiscussionIfNeeded: invite failed");
// Alert user
[[AppDelegate theDelegate] showErrorAsAlert:error];
onComplete(NO);
}];
}
else
{
// Nothing to do
onComplete(YES);
}
}];
}
/**
Create a direct chat with given user.
*/
@ -1628,10 +1540,9 @@ NSString *const RoomViewControllerErrorDomain = @"RoomViewControllerErrorDomain"
}
/**
Check whether the current room is a direct chat left by the other member.
In this case, this method will invite again the left member.
Create the discussion if needed
*/
- (void)createOrRestoreDiscussionIfNeeded:(void (^)(BOOL readyToSend))onComplete
- (void)createDiscussionIfNeeded:(void (^)(BOOL readyToSend))onComplete
{
// Disable the input tool bar during this operation. This prevents us from creating several discussions, or
// trying to send several invites.
@ -1650,7 +1561,7 @@ NSString *const RoomViewControllerErrorDomain = @"RoomViewControllerErrorDomain"
}
else
{
[self restoreDiscussionIfNeeded:completion];
completion(YES);
}
}
@ -2512,8 +2423,8 @@ NSString *const RoomViewControllerErrorDomain = @"RoomViewControllerErrorDomain"
// Set the chosen preset and send the video (conversion takes place in the SDK).
[MXSDKOptions sharedInstance].videoConversionPresetName = presetName;
// Create or invite again the left member before sending the message in case of a discussion (direct chat)
[self createOrRestoreDiscussionIfNeeded:^(BOOL readyToSend) {
// Create before sending the message in case of a discussion (direct chat)
[self createDiscussionIfNeeded:^(BOOL readyToSend) {
if (readyToSend)
{
[[self inputToolbarViewAsRoomInputToolbarView] sendSelectedVideoAsset:videoAsset isPhotoLibraryAsset:isPhotoLibraryAsset];
@ -2531,8 +2442,8 @@ NSString *const RoomViewControllerErrorDomain = @"RoomViewControllerErrorDomain"
// Otherwise default to 1080p and send the video.
[MXSDKOptions sharedInstance].videoConversionPresetName = AVAssetExportPreset1920x1080;
// Create or invite again the left member before sending the message in case of a discussion (direct chat)
[self createOrRestoreDiscussionIfNeeded:^(BOOL readyToSend) {
// Create before sending the message in case of a discussion (direct chat)
[self createDiscussionIfNeeded:^(BOOL readyToSend) {
if (readyToSend)
{
[[self inputToolbarViewAsRoomInputToolbarView] sendSelectedVideoAsset:videoAsset isPhotoLibraryAsset:isPhotoLibraryAsset];
@ -5039,9 +4950,9 @@ NSString *const RoomViewControllerErrorDomain = @"RoomViewControllerErrorDomain"
- (void)roomInputToolbarView:(RoomInputToolbarView *)toolbarView sendAttributedTextMessage:(NSAttributedString *)attributedTextMessage
{
// Create or invite again the left member before sending the message in case of a discussion (direct chat)
// Create before sending the message in case of a discussion (direct chat)
MXWeakify(self);
[self createOrRestoreDiscussionIfNeeded:^(BOOL readyToSend) {
[self createDiscussionIfNeeded:^(BOOL readyToSend) {
MXStrongifyAndReturnIfNil(self);
if (readyToSend) {
@ -7518,9 +7429,9 @@ NSString *const RoomViewControllerErrorDomain = @"RoomViewControllerErrorDomain"
}
- (void)sendImage:(NSData *)imageData mimeType:(NSString *)mimeType {
// Create or invite again the left member before sending the message in case of a discussion (direct chat)
// Create before sending the message in case of a discussion (direct chat)
MXWeakify(self);
[self createOrRestoreDiscussionIfNeeded:^(BOOL readyToSend) {
[self createDiscussionIfNeeded:^(BOOL readyToSend) {
MXStrongifyAndReturnIfNil(self);
if (readyToSend)
{
@ -7535,9 +7446,9 @@ NSString *const RoomViewControllerErrorDomain = @"RoomViewControllerErrorDomain"
}
- (void)sendVideo:(NSURL * _Nonnull)url {
// Create or invite again the left member before sending the message in case of a discussion (direct chat)
// Create before sending the message in case of a discussion (direct chat)
MXWeakify(self);
[self createOrRestoreDiscussionIfNeeded:^(BOOL readyToSend) {
[self createDiscussionIfNeeded:^(BOOL readyToSend) {
MXStrongifyAndReturnIfNil(self);
if (readyToSend)
{
@ -7552,9 +7463,9 @@ NSString *const RoomViewControllerErrorDomain = @"RoomViewControllerErrorDomain"
}
- (void)sendFile:(NSURL * _Nonnull)url mimeType:(NSString *)mimeType {
// Create or invite again the left member before sending the message in case of a discussion (direct chat)
// Create before sending the message in case of a discussion (direct chat)
MXWeakify(self);
[self createOrRestoreDiscussionIfNeeded:^(BOOL readyToSend) {
[self createDiscussionIfNeeded:^(BOOL readyToSend) {
MXStrongifyAndReturnIfNil(self);
if (readyToSend)
{
@ -7633,8 +7544,8 @@ NSString *const RoomViewControllerErrorDomain = @"RoomViewControllerErrorDomain"
NSData *imageData = UIImageJPEGRepresentation(image, 1.0);
// Create or invite again the left member before sending the message in case of a discussion (direct chat)
[self createOrRestoreDiscussionIfNeeded:^(BOOL readyToSend) {
// Create before sending the message in case of a discussion (direct chat)
[self createDiscussionIfNeeded:^(BOOL readyToSend) {
if (readyToSend)
{
[[self inputToolbarViewAsRoomInputToolbarView] sendSelectedImage:imageData
@ -7668,8 +7579,8 @@ NSString *const RoomViewControllerErrorDomain = @"RoomViewControllerErrorDomain"
[coordinatorBridgePresenter dismissWithAnimated:YES completion:nil];
self.mediaPickerPresenter = nil;
// Create or invite again the left member before sending the message in case of a discussion (direct chat)
[self createOrRestoreDiscussionIfNeeded:^(BOOL readyToSend) {
// Create before sending the message in case of a discussion (direct chat)
[self createDiscussionIfNeeded:^(BOOL readyToSend) {
if (readyToSend)
{
[[self inputToolbarViewAsRoomInputToolbarView] sendSelectedImage:imageData
@ -7697,8 +7608,8 @@ NSString *const RoomViewControllerErrorDomain = @"RoomViewControllerErrorDomain"
// Set a 1080p video conversion preset as compression mode only has an effect on the images.
[MXSDKOptions sharedInstance].videoConversionPresetName = AVAssetExportPreset1920x1080;
// Create or invite again the left member before sending the message in case of a discussion (direct chat)
[self createOrRestoreDiscussionIfNeeded:^(BOOL readyToSend) {
// Create before sending the message in case of a discussion (direct chat)
[self createDiscussionIfNeeded:^(BOOL readyToSend) {
if (readyToSend)
{
[[self inputToolbarViewAsRoomInputToolbarView] sendSelectedAssets:assets withCompressionMode:MediaCompressionHelper.defaultCompressionMode];

View file

@ -256,6 +256,10 @@ static const NSTimeInterval kActionMenuComposerHeightAnimationDuration = .3;
updatedHeight += kContextBarHeight;
self.textView.maxHeight -= kContextBarHeight;
break;
case RoomInputToolbarViewSendModeCreateDM:
buttonImage = AssetImages.sendIcon.image;
self.inputContextViewHeightConstraint.constant = 0;
break;
default:
buttonImage = AssetImages.sendIcon.image;

View file

@ -14,3 +14,6 @@ coverage:
# to codecov so that PR reviewers can see uncovered lines
target: auto
threshold: 1%
ignore:
- "Riot/Generated" # ignore the folder and all its contents