Reduce relayout and reload churn; respond to dynamic type changes.

// FREEBIE
This commit is contained in:
Matthew Chen 2017-10-16 12:36:04 -04:00
parent c2608785e1
commit d355b45bae
1 changed files with 5 additions and 1 deletions

View File

@ -1370,7 +1370,6 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) {
#pragma mark - Dynamic Text
// TODO: Fix this.
/**
Called whenever the user manually changes the dynamic type options inside Settings.
@ -2798,6 +2797,11 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) {
// may need to extend the mapping's contents to reflect the current
// range.
[self updateMessageMappingRangeOptions:MessagesRangeSizeMode_Normal];
// Calling resetContentAndLayout is a bit expensive.
// Since by definition this won't affect any cells in the previous
// range, it should be sufficient to call invalidateLayout.
//
// TODO: Investigate whether we can just call invalidateLayout.
[self resetContentAndLayout];
return;
}