Skip to content

Commit

Permalink
Merge pull request #930 from tchapgouv/929-l-application-plante-quand…
Browse files Browse the repository at this point in the history
…-le-dernier-caractere-dun-message-est-un-emoji

Fix crash when trying to display deleted message using Dynamic font
  • Loading branch information
NicolasBuquet authored Nov 22, 2023
2 parents ad9b451 + f424b93 commit b8573c9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Riot/Modules/MatrixKit/Views/MXKMessageTextView.m
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,11 @@ - (NSAttributedString *)respectPreferredFontForAttributedString:(NSAttributedStr
inRange:NSMakeRange(0, workString.length)
options:0
usingBlock:^(id _Nullable value, NSRange range, BOOL * _Nonnull stop) {
[workString removeAttribute:NSFontAttributeName range:range];
[workString addAttribute:NSFontAttributeName value:[(UIFont *)value fontWithSize:preferredFont.pointSize] range:range];
if ([value isKindOfClass:UIFont.class])
{
[workString removeAttribute:NSFontAttributeName range:range];
[workString addAttribute:NSFontAttributeName value:[(UIFont *)value fontWithSize:preferredFont.pointSize] range:range];
}
}];
[workString endEditing];

Expand Down
1 change: 1 addition & 0 deletions changelog.d/929.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Depuis la gestion dynamique de taille d'affichage dans les salons, l'application plante quand le salon contient un message supprimé.

0 comments on commit b8573c9

Please sign in to comment.