mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-19 08:03:50 +02:00
Load and store URLPreviewViewData in RoomBubbleCellData.
Implement close button and store the action in Core Data. Hide the preview image view when no image is received. Remove line breaks in description text.
This commit is contained in:
@@ -32,10 +32,15 @@ extension URLPreviewCacheData {
|
||||
creationDate = date
|
||||
}
|
||||
|
||||
func preview() -> URLPreviewViewData? {
|
||||
func preview(for event: MXEvent) -> URLPreviewViewData? {
|
||||
guard let url = url else { return nil }
|
||||
|
||||
let viewData = URLPreviewViewData(url: url, siteName: siteName, title: title, text: text)
|
||||
let viewData = URLPreviewViewData(url: url,
|
||||
eventID: event.eventId,
|
||||
roomID: event.roomId,
|
||||
siteName: siteName,
|
||||
title: title,
|
||||
text: text)
|
||||
viewData.image = image as? UIImage
|
||||
|
||||
return viewData
|
||||
|
||||
Reference in New Issue
Block a user