mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-05 20:09:04 +00:00
Remove the multipleAttachmentUploadEnabled feature flag.
This commit is contained in:
@@ -22,7 +22,6 @@ protocol CommonSettingsProtocol {
|
|||||||
var enableKeyShareOnInvite: Bool { get }
|
var enableKeyShareOnInvite: Bool { get }
|
||||||
var threadsEnabled: Bool { get }
|
var threadsEnabled: Bool { get }
|
||||||
var hideQuietNotificationAlerts: Bool { get }
|
var hideQuietNotificationAlerts: Bool { get }
|
||||||
var multipleAttachmentUploadEnabled: Bool { get }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Store Element specific app settings.
|
/// Store Element specific app settings.
|
||||||
@@ -61,7 +60,6 @@ final class AppSettings {
|
|||||||
case knockingEnabled
|
case knockingEnabled
|
||||||
case threadsEnabled
|
case threadsEnabled
|
||||||
case developerOptionsEnabled
|
case developerOptionsEnabled
|
||||||
case multipleAttachmentUploadEnabled
|
|
||||||
|
|
||||||
// Doug's tweaks 🔧
|
// Doug's tweaks 🔧
|
||||||
case hideUnreadMessagesBadge
|
case hideUnreadMessagesBadge
|
||||||
@@ -380,9 +378,6 @@ final class AppSettings {
|
|||||||
|
|
||||||
@UserPreference(key: UserDefaultsKeys.hideQuietNotificationAlerts, defaultValue: false, storageType: .userDefaults(store))
|
@UserPreference(key: UserDefaultsKeys.hideQuietNotificationAlerts, defaultValue: false, storageType: .userDefaults(store))
|
||||||
var hideQuietNotificationAlerts
|
var hideQuietNotificationAlerts
|
||||||
|
|
||||||
@UserPreference(key: UserDefaultsKeys.multipleAttachmentUploadEnabled, defaultValue: isDevelopmentBuild, storageType: .userDefaults(store))
|
|
||||||
var multipleAttachmentUploadEnabled
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extension AppSettings: CommonSettingsProtocol { }
|
extension AppSettings: CommonSettingsProtocol { }
|
||||||
|
|||||||
@@ -963,7 +963,6 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
|
|||||||
let stackCoordinator = NavigationStackCoordinator()
|
let stackCoordinator = NavigationStackCoordinator()
|
||||||
|
|
||||||
let mediaPickerCoordinator = MediaPickerScreenCoordinator(mode: mode,
|
let mediaPickerCoordinator = MediaPickerScreenCoordinator(mode: mode,
|
||||||
appSettings: appSettings,
|
|
||||||
userIndicatorController: userIndicatorController,
|
userIndicatorController: userIndicatorController,
|
||||||
orientationManager: appMediator.windowManager) { [weak self] action in
|
orientationManager: appMediator.windowManager) { [weak self] action in
|
||||||
guard let self else {
|
guard let self else {
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ struct DocumentPicker: UIViewControllerRepresentable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func updateUIViewController(_ uiViewController: UIDocumentPickerViewController, context: Context) {
|
func updateUIViewController(_ uiViewController: UIDocumentPickerViewController, context: Context) {
|
||||||
|
// Override the app wide tint color (currently set to `.compound.texActionPrimary
|
||||||
|
// as it's not legible enough in dark mode
|
||||||
uiViewController.view.tintColor = .compound.textActionAccent
|
uiViewController.view.tintColor = .compound.textActionAccent
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,23 +29,19 @@ enum MediaPickerScreenCoordinatorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class MediaPickerScreenCoordinator: CoordinatorProtocol {
|
class MediaPickerScreenCoordinator: CoordinatorProtocol {
|
||||||
private let orientationManager: OrientationManagerProtocol
|
|
||||||
private let userIndicatorController: UserIndicatorControllerProtocol
|
|
||||||
private let mode: MediaPickerScreenMode
|
private let mode: MediaPickerScreenMode
|
||||||
|
private let userIndicatorController: UserIndicatorControllerProtocol
|
||||||
|
private let orientationManager: OrientationManagerProtocol
|
||||||
private let callback: (MediaPickerScreenCoordinatorAction) -> Void
|
private let callback: (MediaPickerScreenCoordinatorAction) -> Void
|
||||||
|
|
||||||
init(mode: MediaPickerScreenMode,
|
init(mode: MediaPickerScreenMode,
|
||||||
appSettings: AppSettings,
|
|
||||||
userIndicatorController: UserIndicatorControllerProtocol,
|
userIndicatorController: UserIndicatorControllerProtocol,
|
||||||
orientationManager: OrientationManagerProtocol,
|
orientationManager: OrientationManagerProtocol,
|
||||||
callback: @escaping (MediaPickerScreenCoordinatorAction) -> Void) {
|
callback: @escaping (MediaPickerScreenCoordinatorAction) -> Void) {
|
||||||
|
self.mode = mode
|
||||||
self.userIndicatorController = userIndicatorController
|
self.userIndicatorController = userIndicatorController
|
||||||
self.orientationManager = orientationManager
|
self.orientationManager = orientationManager
|
||||||
self.callback = callback
|
self.callback = callback
|
||||||
|
|
||||||
// The users of the media picker chose their ideal selection type leaving
|
|
||||||
// the feature flag to only be checked and enforced on this level.
|
|
||||||
self.mode = appSettings.multipleAttachmentUploadEnabled ? mode : .init(source: mode.source, selectionType: .single)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func toPresentable() -> AnyView {
|
func toPresentable() -> AnyView {
|
||||||
|
|||||||
@@ -49,6 +49,8 @@ struct PhotoLibraryPicker: UIViewControllerRepresentable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func updateUIViewController(_ uiViewController: PHPickerViewController, context: Context) {
|
func updateUIViewController(_ uiViewController: PHPickerViewController, context: Context) {
|
||||||
|
// Override the app wide tint color (currently set to `.compound.texActionPrimary
|
||||||
|
// as it's not legible enough in dark mode
|
||||||
uiViewController.view.tintColor = .compound.textActionAccent
|
uiViewController.view.tintColor = .compound.textActionAccent
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,6 @@ final class RoomDetailsEditScreenCoordinator: CoordinatorProtocol {
|
|||||||
let stackCoordinator = NavigationStackCoordinator()
|
let stackCoordinator = NavigationStackCoordinator()
|
||||||
|
|
||||||
let mediaPickerCoordinator = MediaPickerScreenCoordinator(mode: mode,
|
let mediaPickerCoordinator = MediaPickerScreenCoordinator(mode: mode,
|
||||||
appSettings: parameters.appSettings,
|
|
||||||
userIndicatorController: parameters.userIndicatorController,
|
userIndicatorController: parameters.userIndicatorController,
|
||||||
orientationManager: parameters.orientationManager) { [weak self] action in
|
orientationManager: parameters.orientationManager) { [weak self] action in
|
||||||
guard let self else { return }
|
guard let self else { return }
|
||||||
|
|||||||
-1
@@ -43,7 +43,6 @@ protocol DeveloperOptionsProtocol: AnyObject {
|
|||||||
var enableKeyShareOnInvite: Bool { get set }
|
var enableKeyShareOnInvite: Bool { get set }
|
||||||
var threadsEnabled: Bool { get set }
|
var threadsEnabled: Bool { get set }
|
||||||
var hideQuietNotificationAlerts: Bool { get set }
|
var hideQuietNotificationAlerts: Bool { get set }
|
||||||
var multipleAttachmentUploadEnabled: Bool { get set }
|
|
||||||
|
|
||||||
var hideUnreadMessagesBadge: Bool { get set }
|
var hideUnreadMessagesBadge: Bool { get set }
|
||||||
var elementCallBaseURLOverride: URL? { get set }
|
var elementCallBaseURLOverride: URL? { get set }
|
||||||
|
|||||||
+1
-7
@@ -55,13 +55,7 @@ struct DeveloperOptionsScreen: View {
|
|||||||
Text("Low priority filter")
|
Text("Low priority filter")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Section("Timeline") {
|
|
||||||
Toggle(isOn: $context.multipleAttachmentUploadEnabled) {
|
|
||||||
Text("Allow selecting multiple attachments for upload")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Section("Join rules") {
|
Section("Join rules") {
|
||||||
Toggle(isOn: $context.knockingEnabled) {
|
Toggle(isOn: $context.knockingEnabled) {
|
||||||
Text("Knocking")
|
Text("Knocking")
|
||||||
|
|||||||
-1
@@ -57,7 +57,6 @@ final class UserDetailsEditScreenCoordinator: CoordinatorProtocol {
|
|||||||
let stackCoordinator = NavigationStackCoordinator()
|
let stackCoordinator = NavigationStackCoordinator()
|
||||||
|
|
||||||
let mediaPickerCoordinator = MediaPickerScreenCoordinator(mode: mode,
|
let mediaPickerCoordinator = MediaPickerScreenCoordinator(mode: mode,
|
||||||
appSettings: parameters.appSettings,
|
|
||||||
userIndicatorController: parameters.userIndicatorController,
|
userIndicatorController: parameters.userIndicatorController,
|
||||||
orientationManager: parameters.orientationManager) { [weak self] action in
|
orientationManager: parameters.orientationManager) { [weak self] action in
|
||||||
guard let self else { return }
|
guard let self else { return }
|
||||||
|
|||||||
@@ -144,7 +144,6 @@ final class StartChatScreenCoordinator: CoordinatorProtocol {
|
|||||||
let stackCoordinator = NavigationStackCoordinator()
|
let stackCoordinator = NavigationStackCoordinator()
|
||||||
|
|
||||||
let mediaPickerCoordinator = MediaPickerScreenCoordinator(mode: mode,
|
let mediaPickerCoordinator = MediaPickerScreenCoordinator(mode: mode,
|
||||||
appSettings: parameters.appSettings,
|
|
||||||
userIndicatorController: parameters.userIndicatorController,
|
userIndicatorController: parameters.userIndicatorController,
|
||||||
orientationManager: parameters.orientationManager) { [weak self] action in
|
orientationManager: parameters.orientationManager) { [weak self] action in
|
||||||
guard let self else { return }
|
guard let self else { return }
|
||||||
|
|||||||
Reference in New Issue
Block a user