mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Allow showing the developer options on any build type by tapping the settings screen version footer 7 times (a la android)
This commit is contained in:
committed by
Stefan Ceriu
parent
f11a610f46
commit
a2faae20c2
@@ -64,6 +64,7 @@ enum SettingsScreenViewAction {
|
||||
case secureBackup
|
||||
case manageAccount(url: URL)
|
||||
case notifications
|
||||
case enableDeveloperOptions
|
||||
case developerOptions
|
||||
case advancedSettings
|
||||
case logout
|
||||
|
||||
@@ -29,7 +29,7 @@ class SettingsScreenViewModel: SettingsScreenViewModelType, SettingsScreenViewMo
|
||||
init(userSession: UserSessionProtocol, appSettings: AppSettings) {
|
||||
super.init(initialViewState: .init(deviceID: userSession.clientProxy.deviceID,
|
||||
userID: userSession.clientProxy.userID,
|
||||
showDeveloperOptions: appSettings.isDevelopmentBuild),
|
||||
showDeveloperOptions: AppSettings.isDevelopmentBuild),
|
||||
imageProvider: userSession.mediaProvider)
|
||||
|
||||
userSession.clientProxy.userAvatarURLPublisher
|
||||
@@ -110,6 +110,8 @@ class SettingsScreenViewModel: SettingsScreenViewModelType, SettingsScreenViewMo
|
||||
actionsSubject.send(.notifications)
|
||||
case .advancedSettings:
|
||||
actionsSubject.send(.advancedSettings)
|
||||
case .enableDeveloperOptions:
|
||||
state.showDeveloperOptions = true
|
||||
case .developerOptions:
|
||||
actionsSubject.send(.developerOptions)
|
||||
}
|
||||
|
||||
@@ -196,6 +196,9 @@ struct SettingsScreen: View {
|
||||
.compoundListSectionFooter()
|
||||
.textSelection(.enabled)
|
||||
.padding(.top, 24)
|
||||
.onTapGesture(count: 7) {
|
||||
context.send(viewAction: .enableDeveloperOptions)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user