mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-06 04:18:31 +00:00
Use the maxUploadSize in the media upload screen. (#4359)
* Fix a bug where some files sizes were sent as 0. * Make FileManger.sizeForItem(at:) a UInt. The docs specifically say that FileAttributeKey.size returns an unsigned long long so I have no idea why we were returning a Double here… * Add the maxMediaUploadSize property on ClientProxy. * Use the maxUploadSize to set a target video size and to show a file too big error. * Refactor media upload parameter order.
This commit is contained in:
@@ -859,6 +859,7 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
|
||||
let stackCoordinator = NavigationStackCoordinator()
|
||||
|
||||
let roomDetailsEditParameters = RoomDetailsEditScreenCoordinatorParameters(roomProxy: roomProxy,
|
||||
clientProxy: userSession.clientProxy,
|
||||
mediaProvider: userSession.mediaProvider,
|
||||
mediaUploadingPreprocessor: MediaUploadingPreprocessor(appSettings: appSettings),
|
||||
navigationStackCoordinator: stackCoordinator,
|
||||
@@ -949,13 +950,14 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
|
||||
animated: Bool) {
|
||||
let stackCoordinator = NavigationStackCoordinator()
|
||||
|
||||
let parameters = MediaUploadPreviewScreenCoordinatorParameters(timelineController: timelineController,
|
||||
userIndicatorController: userIndicatorController,
|
||||
mediaUploadingPreprocessor: MediaUploadingPreprocessor(appSettings: appSettings),
|
||||
let parameters = MediaUploadPreviewScreenCoordinatorParameters(url: url,
|
||||
title: url.lastPathComponent,
|
||||
url: url,
|
||||
isRoomEncrypted: roomProxy.infoPublisher.value.isEncrypted,
|
||||
shouldShowCaptionWarning: appSettings.shouldShowMediaCaptionWarning,
|
||||
isRoomEncrypted: roomProxy.infoPublisher.value.isEncrypted)
|
||||
mediaUploadingPreprocessor: MediaUploadingPreprocessor(appSettings: appSettings),
|
||||
timelineController: timelineController,
|
||||
clientProxy: userSession.clientProxy,
|
||||
userIndicatorController: userIndicatorController)
|
||||
|
||||
let mediaUploadPreviewScreenCoordinator = MediaUploadPreviewScreenCoordinator(parameters: parameters)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user