Fix redundant check

This commit is contained in:
ismailgulek
2022-01-27 03:28:22 +03:00
parent d2e5e29ad9
commit 60e2c33f6e
+11 -18
View File
@@ -270,29 +270,22 @@ const CGFloat kTypingCellHeight = 24;
}
else if (RiotSettings.shared.enableThreads)
{
if (RiotSettings.shared.enableThreads)
// if not in a thread, ignore all threaded events
if (event.isInThread)
{
// if not in a thread, ignore all threaded events
if (event.isInThread)
// ignore the event
return NO;
}
// also ignore events related to threaded events
if (event.relatesTo.eventId)
{
MXEvent *relatedEvent = [self.mxSession.store eventWithEventId:event.relatesTo.eventId
inRoom:event.roomId];
if (relatedEvent.isInThread)
{
// ignore the event
return NO;
}
// also ignore events related to threaded events
if (event.relatesTo.eventId)
{
MXEvent *relatedEvent = [self.mxSession.store eventWithEventId:event.relatesTo.eventId
inRoom:event.roomId];
if (relatedEvent.isInThread)
{
// ignore the event
return NO;
}
}
}
else
{
return YES;
}
}