Disable thread filtering on regular timeline when threads disabled

This commit is contained in:
ismailgulek
2021-12-09 15:11:07 +03:00
parent 24a7b6775b
commit bf37203553
+18 -11
View File
@@ -270,22 +270,29 @@ const CGFloat kTypingCellHeight = 24;
}
else
{
// if not in a thread, ignore all threaded events
if (event.isInThread)
if (RiotSettings.shared.enableThreads)
{
// 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)
// 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;
}
}
}
else
{
return YES;
}
}