mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-02 22:26:59 +02:00
Messages: Regular notifications should be ignored when the room is in mentions only mode.
This commit is contained in:
@@ -22,6 +22,8 @@
|
||||
#import "MXKRoomBubbleTableViewCell+Vector.h"
|
||||
#import "AvatarGenerator.h"
|
||||
|
||||
#import "MXRoom+Vector.h"
|
||||
|
||||
@implementation RoomDataSource
|
||||
|
||||
- (instancetype)initWithRoomId:(NSString *)roomId andMatrixSession:(MXSession *)matrixSession
|
||||
@@ -51,6 +53,18 @@
|
||||
return self;
|
||||
}
|
||||
|
||||
// Ignore regular notification count if the room is in 'mentions only" mode
|
||||
- (NSUInteger)notificationCount
|
||||
{
|
||||
if (self.room.isMentionsOnly)
|
||||
{
|
||||
// Only the highlighted missed messages are counted
|
||||
return super.highlightCount;
|
||||
}
|
||||
|
||||
return super.notificationCount;
|
||||
}
|
||||
|
||||
- (void)didReceiveReceiptEvent:(MXEvent *)receiptEvent roomState:(MXRoomState *)roomState
|
||||
{
|
||||
// Override this callback to force rendering of each cell with read receipts information.
|
||||
|
||||
Reference in New Issue
Block a user