Media upload tweaks (#3643)

* Focus the media caption composer if a hardware keyboard is available
Not worrying about live connections, this screen is short lived.

* Fix a bug where you could hit the send button multiple times while waiting for the media to be converted.

* Begin processing media as soon as the media upload screen is shown.
This commit is contained in:
Doug
2024-12-20 10:34:22 +00:00
committed by GitHub
parent 98c57b60d3
commit 888a61ace1
5 changed files with 58 additions and 16 deletions
@@ -138,8 +138,13 @@ class MediaUploadPreviewScreenViewModelTests: XCTestCase {
}
private func send() async throws {
XCTAssertFalse(context.viewState.shouldDisableInteraction, "Attempting to send when interaction is disabled.")
let deferred = deferFulfillment(viewModel.actions) { $0 == .dismiss }
context.send(viewAction: .send)
XCTAssertTrue(context.viewState.shouldDisableInteraction, "The interaction should be disabled while sending.")
try await deferred.fulfill()
}
}