mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
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:
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user