mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 08:32:53 +02:00
Merge branch 'master' into develop
This commit is contained in:
@@ -2150,7 +2150,10 @@ typedef NS_ENUM (NSUInteger, MXKRoomDataSourceError) {
|
||||
}
|
||||
else
|
||||
{
|
||||
failure([NSError errorWithDomain:MXKRoomDataSourceErrorDomain code:MXKRoomDataSourceErrorResendGeneric userInfo:nil]);
|
||||
if (failure)
|
||||
{
|
||||
failure([NSError errorWithDomain:MXKRoomDataSourceErrorDomain code:MXKRoomDataSourceErrorResendGeneric userInfo:nil]);
|
||||
}
|
||||
MXLogWarning(@"[MXKRoomDataSource][%p] resendEventWithEventId: Warning - Unable to resend room message of type: %@", self, msgType);
|
||||
}
|
||||
}
|
||||
@@ -2177,7 +2180,10 @@ typedef NS_ENUM (NSUInteger, MXKRoomDataSourceError) {
|
||||
NSURL *localFileURL = [NSURL URLWithString:localFilePath];
|
||||
|
||||
if (![NSFileManager.defaultManager fileExistsAtPath:localFilePath]) {
|
||||
failure([NSError errorWithDomain:MXKRoomDataSourceErrorDomain code:MXKRoomDataSourceErrorResendInvalidLocalFilePath userInfo:nil]);
|
||||
if (failure)
|
||||
{
|
||||
failure([NSError errorWithDomain:MXKRoomDataSourceErrorDomain code:MXKRoomDataSourceErrorResendInvalidLocalFilePath userInfo:nil]);
|
||||
}
|
||||
MXLogWarning(@"[MXKRoomDataSource][%p] resendEventWithEventId: Warning - Unable to resend voice message, invalid file path.", self);
|
||||
return;
|
||||
}
|
||||
@@ -2247,7 +2253,10 @@ typedef NS_ENUM (NSUInteger, MXKRoomDataSourceError) {
|
||||
}
|
||||
else
|
||||
{
|
||||
failure([NSError errorWithDomain:MXKRoomDataSourceErrorDomain code:MXKRoomDataSourceErrorResendGeneric userInfo:nil]);
|
||||
if (failure)
|
||||
{
|
||||
failure([NSError errorWithDomain:MXKRoomDataSourceErrorDomain code:MXKRoomDataSourceErrorResendGeneric userInfo:nil]);
|
||||
}
|
||||
MXLogWarning(@"[MXKRoomDataSource][%p] resendEventWithEventId: Warning - Unable to resend room message of type: %@", self, msgType);
|
||||
}
|
||||
}
|
||||
@@ -2259,13 +2268,19 @@ typedef NS_ENUM (NSUInteger, MXKRoomDataSourceError) {
|
||||
}
|
||||
else
|
||||
{
|
||||
failure([NSError errorWithDomain:MXKRoomDataSourceErrorDomain code:MXKRoomDataSourceErrorResendInvalidMessageType userInfo:nil]);
|
||||
if (failure)
|
||||
{
|
||||
failure([NSError errorWithDomain:MXKRoomDataSourceErrorDomain code:MXKRoomDataSourceErrorResendInvalidMessageType userInfo:nil]);
|
||||
}
|
||||
MXLogWarning(@"[MXKRoomDataSource][%p] resendEventWithEventId: Warning - Unable to resend room message of type: %@", self, msgType);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
failure([NSError errorWithDomain:MXKRoomDataSourceErrorDomain code:MXKRoomDataSourceErrorResendInvalidMessageType userInfo:nil]);
|
||||
if (failure)
|
||||
{
|
||||
failure([NSError errorWithDomain:MXKRoomDataSourceErrorDomain code:MXKRoomDataSourceErrorResendInvalidMessageType userInfo:nil]);
|
||||
}
|
||||
MXLogWarning(@"[MXKRoomDataSource][%p] MXKRoomDataSource: Warning - Only resend of MXEventTypeRoomMessage is allowed. Event.type: %@", self, event.type);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,8 +63,12 @@
|
||||
|
||||
- (BOOL)hasUnread
|
||||
{
|
||||
bool isRoomUnread = [[self mxSession] isRoomMarkedAsUnread:roomSummary.roomId];
|
||||
return (roomSummary.localUnreadEventCount != 0 || isRoomUnread);
|
||||
return (roomSummary.localUnreadEventCount != 0);
|
||||
}
|
||||
|
||||
- (BOOL)isRoomMarkedAsUnread
|
||||
{
|
||||
return [[self mxSession] isRoomMarkedAsUnread:roomSummary.roomId];;
|
||||
}
|
||||
|
||||
- (NSString *)roomIdentifier
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
@property (nonatomic, readonly) NSString *lastEventDate;
|
||||
|
||||
@property (nonatomic, readonly) BOOL hasUnread;
|
||||
@property (nonatomic, readonly) BOOL isRoomMarkedAsUnread;
|
||||
@property (nonatomic, readonly) NSUInteger notificationCount;
|
||||
@property (nonatomic, readonly) NSUInteger highlightCount;
|
||||
@property (nonatomic, readonly) NSString *notificationCountStringValue;
|
||||
|
||||
Reference in New Issue
Block a user