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
@@ -14,9 +14,12 @@
// limitations under the License.
//
import Foundation
import CoreData
extension ClosedURLPreview {
// Nothing to extend, however having this file stops Xcode
// complaining that it can't find ClosedURLPreview.
convenience init(context: NSManagedObjectContext, eventID: String, roomID: String) {
self.init(context: context)
self.eventID = eventID
self.roomID = roomID
}
}