Hide typing notifications in threads, fix #5271

This commit is contained in:
ismailgulek
2021-12-08 14:45:44 +03:00
parent f2917c9671
commit ad3e671adf
3 changed files with 21 additions and 11 deletions
@@ -45,6 +45,11 @@
*/
@property(nonatomic) BOOL showBubbleDateTimeOnSelection;
/**
Flag to decide displaying typing row in the data source. Default is YES.
*/
@property (nonatomic, assign) BOOL showTypingRow;
/**
Current room members trust level for an encrypted room.
*/
+15 -11
View File
@@ -132,6 +132,8 @@ const CGFloat kTypingCellHeight = 24;
[self.room.summary enableTrustTracking:YES];
[self fetchEncryptionTrustedLevel];
}
self.showTypingRow = YES;
}
- (id<RoomDataSourceDelegate>)roomDataSourceDelegate
@@ -325,28 +327,30 @@ const CGFloat kTypingCellHeight = 24;
[self updateStatusInfo];
}
if (!self.currentTypingUsers)
if (self.showTypingRow && self.currentTypingUsers)
{
self.typingCellIndex = bubbles.count;
return bubbles.count + 1;
}
else
{
self.typingCellIndex = -1;
// we may have changed the number of bubbles in this block, consider that change
return bubbles.count;
}
self.typingCellIndex = bubbles.count;
return bubbles.count + 1;
}
if (!self.currentTypingUsers)
if (self.showTypingRow && self.currentTypingUsers)
{
self.typingCellIndex = count;
return count + 1;
}
else
{
self.typingCellIndex = -1;
// leave it as is, if coming as 0 from super
return count;
}
self.typingCellIndex = count;
return count + 1;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
@@ -23,6 +23,7 @@ public class ThreadDataSource: RoomDataSource {
super.finalizeInitialization()
showReadMarker = false
showBubbleReceipts = false
showTypingRow = false
}
}