Refactoring and tidy up.

Make the preview manager a singleton (passing in the MXSession to functions). Fix tests.

PreviewManager → URLPreviewManager
URLPreviewViewData → URLPreviewData
URLPreviewCache → URLPreviewStore
This commit is contained in:
Doug
2021-09-01 12:28:56 +01:00
parent 4331994d72
commit 882fcab738
15 changed files with 217 additions and 210 deletions
@@ -1259,7 +1259,7 @@ const CGFloat kTypingCellHeight = 24;
}
// Remember that the user closed the preview so it isn't shown again.
[LegacyAppDelegate.theDelegate.previewManager closePreviewFor:eventID in:roomID];
[URLPreviewManager.shared closePreviewFor:eventID in:roomID];
// Remove the preview data and refresh the cells.
cellData.urlPreviewData = nil;