mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 17:12:45 +02:00
Hide typing notifications in threads, fix #5271
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user