mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-28 23:32:41 +00:00
Add more details to logs and change font of error message
This commit is contained in:
parent
3ec1e80c9d
commit
a088b46ece
1 changed files with 11 additions and 3 deletions
|
@ -70,13 +70,21 @@ static NSString *const kEventFormatterTimeFormat = @"HH:mm";
|
|||
// If we cannot create attributed string, but the message is nevertheless meant for display (e.g. not an edit event), show generic error
|
||||
// instead of a missing message on a timeline.
|
||||
if (
|
||||
(!string || string.length == 0)
|
||||
!string
|
||||
&& [self.eventTypesFilterForMessages containsObject:event.type]
|
||||
&& !event.isEditEvent
|
||||
)
|
||||
{
|
||||
MXLogError(@"[EventFormatter]: Cannot format string for displayable event: %@, error: %lu", event.eventId, *error);
|
||||
string = [[NSAttributedString alloc] initWithString:[VectorL10n noticeErrorUnformattableEvent]];
|
||||
MXLogError(@"[EventFormatter]: Cannot format string for displayable event: %@, type: %@, msgtype: %@, has room state: %d, members: %lu, error: %lu",
|
||||
event.eventId,
|
||||
event.type,
|
||||
event.content[@"msgtype"],
|
||||
roomState != nil,
|
||||
roomState.membersCount.members,
|
||||
*error);
|
||||
string = [[NSAttributedString alloc] initWithString:[VectorL10n noticeErrorUnformattableEvent] attributes:@{
|
||||
NSFontAttributeName: [self encryptedMessagesTextFont]
|
||||
}];
|
||||
}
|
||||
return string;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue