Check whether URL previews should be shown in a single location.

Reset all cell data when this setting is changed to force a refresh.
Rename `hasClosedPreview(from:)` to `shouldShowPreview(for:)` for clarity and potentially adding more rules at a later date.
This commit is contained in:
Doug
2021-09-29 11:39:11 +01:00
parent 518d108573
commit 522f4e800c
4 changed files with 9 additions and 11 deletions

View File

@@ -3124,6 +3124,9 @@ TableViewSectionsDelegate>
- (void)toggleEnableURLPreviews:(UISwitch *)sender
{
RiotSettings.shared.roomScreenShowsURLPreviews = sender.on;
// Any loaded cell data is now invalid and should be refreshed for the new value.
[[MXKRoomDataSourceManager sharedManagerForMatrixSession:self.mainSession] reset];
}
- (void)toggleSendCrashReport:(id)sender