mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
Periphery cleanup (#5893)
This commit is contained in:
-2
@@ -13,7 +13,6 @@ struct MediaUploadPreviewScreenCoordinatorParameters {
|
||||
let mediaURLs: [URL]
|
||||
let caption: NSAttributedString?
|
||||
let title: String?
|
||||
let isRoomEncrypted: Bool
|
||||
let shouldShowCaptionWarning: Bool
|
||||
let mediaUploadingPreprocessor: MediaUploadingPreprocessor
|
||||
let timelineController: TimelineControllerProtocol
|
||||
@@ -38,7 +37,6 @@ final class MediaUploadPreviewScreenCoordinator: CoordinatorProtocol {
|
||||
viewModel = MediaUploadPreviewScreenViewModel(mediaURLs: parameters.mediaURLs,
|
||||
caption: parameters.caption,
|
||||
title: parameters.title,
|
||||
isRoomEncrypted: parameters.isRoomEncrypted,
|
||||
shouldShowCaptionWarning: parameters.shouldShowCaptionWarning,
|
||||
mediaUploadingPreprocessor: parameters.mediaUploadingPreprocessor,
|
||||
timelineController: parameters.timelineController,
|
||||
|
||||
@@ -17,7 +17,6 @@ struct MediaUploadPreviewScreenViewState: BindableState {
|
||||
let mediaURLs: [URL]
|
||||
let title: String?
|
||||
let shouldShowCaptionWarning: Bool
|
||||
let isRoomEncrypted: Bool
|
||||
var shouldDisableInteraction = false
|
||||
|
||||
var mediaEditVersion = 0
|
||||
|
||||
-2
@@ -32,7 +32,6 @@ class MediaUploadPreviewScreenViewModel: MediaUploadPreviewScreenViewModelType,
|
||||
init(mediaURLs: [URL],
|
||||
caption: NSAttributedString?,
|
||||
title: String?,
|
||||
isRoomEncrypted: Bool,
|
||||
shouldShowCaptionWarning: Bool,
|
||||
mediaUploadingPreprocessor: MediaUploadingPreprocessor,
|
||||
timelineController: TimelineControllerProtocol,
|
||||
@@ -50,7 +49,6 @@ class MediaUploadPreviewScreenViewModel: MediaUploadPreviewScreenViewModelType,
|
||||
super.init(initialViewState: MediaUploadPreviewScreenViewState(mediaURLs: mediaURLs,
|
||||
title: title,
|
||||
shouldShowCaptionWarning: shouldShowCaptionWarning,
|
||||
isRoomEncrypted: isRoomEncrypted,
|
||||
bindings: .init(caption: caption ?? NSAttributedString())))
|
||||
}
|
||||
|
||||
|
||||
@@ -388,12 +388,10 @@ private struct ImageEditorView: UIViewControllerRepresentable {
|
||||
|
||||
struct MediaUploadPreviewScreen_Previews: PreviewProvider, TestablePreview {
|
||||
static let snapshotURL = URL.picturesDirectory
|
||||
static let testURL = Bundle.main.url(forResource: "AppIcon60x60@2x", withExtension: "png")
|
||||
|
||||
static let viewModel = MediaUploadPreviewScreenViewModel(mediaURLs: [snapshotURL],
|
||||
caption: nil,
|
||||
title: "App Icon.png",
|
||||
isRoomEncrypted: true,
|
||||
shouldShowCaptionWarning: true,
|
||||
mediaUploadingPreprocessor: MediaUploadingPreprocessor(appSettings: .volatile()),
|
||||
timelineController: TimelineControllerMock(.init()),
|
||||
|
||||
Reference in New Issue
Block a user