Commit Graph

14 Commits

Author SHA1 Message Date
Doug 6561b2151a Include URL previews in addVerticalWhitespaceToString:forEvent: and remove heightForCellData:withMaximumWidth: from the various TextMsgBubbleCell subclasses.
Use the bubble cell data's available width when sizing URL previews and update the defaultAvailableWidth and reducedWidthThreshold accordingly.
2021-09-23 17:30:24 +01:00
Doug 74277d73a9 Use constants. 2021-09-16 17:13:56 +01:00
Doug 63d822b026 Reduce the width of URL previews on 4" devices. 2021-09-16 16:41:21 +01:00
Doug 0f88e8e851 Add more docs and comments.
Rename store.store(_:) to store.cache(_:).
2021-09-08 09:51:47 +01:00
Doug 5f446faa6d Remove "Loading preview..." label. 2021-09-07 16:12:12 +01:00
Doug 049f3c47d1 Fix unsatisfiable constraints messages. 2021-09-07 14:49:51 +01:00
Doug 47e54b79cc Ensure correct font is used. 2021-09-02 18:08:35 +01:00
Doug 885f3208bf Show an activity indicator until the preview has loaded. 2021-09-02 17:37:48 +01:00
Doug 2e795607bb Update layout for text only previews. 2021-09-02 12:41:55 +01:00
Doug 0e06a22c7e Use stack views for layout. 2021-09-02 11:38:16 +01:00
Doug 882fcab738 Refactoring and tidy up.
Make the preview manager a singleton (passing in the MXSession to functions). Fix tests.

PreviewManager → URLPreviewManager
URLPreviewViewData → URLPreviewData
URLPreviewCache → URLPreviewStore
2021-09-01 12:28:56 +01:00
Doug 4331994d72 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.
2021-09-01 10:37:37 +01:00
Doug 660b95b20a Add comments about the un-sanitized URL. 2021-08-24 09:42:55 +01:00
Doug dd600e5e7e Add PreviewManger with Core Data cache and a URLPreviewView with a view model.
Changes to RoomDataSource still to come.
2021-08-23 17:56:24 +01:00