Do not show tile for incoming call

This commit is contained in:
ismailgulek
2021-01-21 13:52:14 +03:00
parent 4728ae0e84
commit 9981a03327
2 changed files with 19 additions and 2 deletions
@@ -73,8 +73,12 @@ class RoomDirectCallStatusBubbleCell: RoomBaseCallBubbleCell {
.remotelyOnHold:
statusTextView.text = VectorL10n.eventFormatterCallYouCurrentlyIn
case .ringing:
// TODO: Waiting for design decision here
statusTextView.text = nil
if call.isIncoming {
// should not be here
statusTextView.text = nil
} else {
statusTextView.text = VectorL10n.eventFormatterCallYouCurrentlyIn
}
case .ended:
switch call.endReason {
case .unknown,
+13
View File
@@ -26,6 +26,7 @@
#import "DecryptionFailureTracker.h"
#import "EventFormatter+DTCoreTextFix.h"
#import <MatrixSDK/MatrixSDK.h>
#pragma mark - Constants definitions
@@ -198,6 +199,18 @@ static NSString *const kEventFormatterTimeFormat = @"HH:mm";
case MXEventTypeCallRejectReplacement:
// Do not show call events except invite and reject in timeline
return nil;
case MXEventTypeCallInvite:
{
MXCallInviteEventContent *content = [MXCallInviteEventContent modelFromJSON:event.content];
MXCall *call = [mxSession.callManager callWithCallId:content.callId];
if (call && call.isIncoming && call.state == MXCallStateRinging)
{
// incoming call UI will be handled by CallKit (or incoming call screen if CallKit disabled)
// do not show a bubble for this case
return nil;
}
}
break;
case MXEventTypeKeyVerificationCancel:
case MXEventTypeKeyVerificationDone:
// Make event types MXEventTypeKeyVerificationCancel and MXEventTypeKeyVerificationDone visible in timeline.