Skip to content

Commit

Permalink
Fix crash when trying to display deleted message using Dynamic font
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasBuquet committed Nov 22, 2023
1 parent ad9b451 commit f424b93
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 f424b93

Please sign in to comment.