A bunch of random tweaks. (#3317)

- Fix warning on single case enum.
- Remove unused subjects.
- Fix a lint warning.
- Remove unused success value.
- Fix warning about position of try await.
- Add a note about the common tracing configuration.
- Show an indicator when resolving a send failure fails.
- Make sure the whole row is clickable in the GlobalSearchScreen.
This commit is contained in:
Doug
2024-09-23 13:00:40 +01:00
committed by GitHub
parent d48214a98b
commit e4736b12bb
13 changed files with 48 additions and 35 deletions
@@ -28,7 +28,7 @@ struct CallScreenViewState: BindableState {
struct Bindings {
var javaScriptMessageHandler: ((Any) -> Void)?
var javaScriptEvaluator: ((String) async throws -> Any)?
var requestPictureInPictureHandler: (() async -> Result<AVPictureInPictureController, CallScreenError>)?
var requestPictureInPictureHandler: (() async -> Result<Void, CallScreenError>)?
var alertInfo: AlertInfo<UUID>?
}
@@ -189,7 +189,7 @@ class CallScreenViewModel: CallScreenViewModelType, CallScreenViewModelProtocol
}
switch await requestPictureInPictureHandler() {
case .success(let controller):
case .success:
actionsSubject.send(.pictureInPictureStarted)
case .failure:
actionsSubject.send(.dismiss)
@@ -200,7 +200,7 @@ private struct CallView: UIViewRepresentable {
// MARK: - Picture in Picture
func requestPictureInPicture() async -> Result<AVPictureInPictureController, CallScreenError> {
func requestPictureInPicture() async -> Result<Void, CallScreenError> {
guard let pictureInPictureController,
pictureInPictureController.isPictureInPicturePossible,
case .success(true) = await webViewCanEnterPictureInPicture() else {
@@ -208,7 +208,7 @@ private struct CallView: UIViewRepresentable {
}
pictureInPictureController.startPictureInPicture()
return .success(pictureInPictureController)
return .success(())
}
func stopPictureInPicture() {