Support adding a caption to media uploads. (#3531)

* Add a composer to the MediaUploadPreviewScreen.

And send it's content to the media upload's caption.

* Use the new compound SendButton (updating relative padding in the toolbar).

* Update snapshots.

* Add unit tests for sending a caption.
This commit is contained in:
Doug
2024-11-19 16:35:01 +00:00
committed by GitHub
parent 352bb577ad
commit b75ad6a5aa
56 changed files with 530 additions and 284 deletions
@@ -49,22 +49,8 @@ extension JoinedRoomProxyMock {
id = configuration.id
isEncrypted = configuration.isEncrypted
let timeline = TimelineProxyMock()
timeline.sendMessageEventContentReturnValue = .success(())
timeline.paginateBackwardsRequestSizeReturnValue = .success(())
timeline.paginateForwardsRequestSizeReturnValue = .success(())
timeline.sendReadReceiptForTypeReturnValue = .success(())
if configuration.shouldUseAutoUpdatingTimeline {
timeline.underlyingTimelineProvider = AutoUpdatingRoomTimelineProviderMock()
} else {
let timelineProvider = RoomTimelineProviderMock()
timelineProvider.paginationState = .init(backward: configuration.timelineStartReached ? .timelineEndReached : .idle, forward: .timelineEndReached)
timelineProvider.underlyingMembershipChangePublisher = PassthroughSubject().eraseToAnyPublisher()
timeline.underlyingTimelineProvider = timelineProvider
}
self.timeline = timeline
timeline = TimelineProxyMock(.init(isAutoUpdating: configuration.shouldUseAutoUpdatingTimeline,
timelineStartReached: configuration.timelineStartReached))
ownUserID = configuration.ownUserID