mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Removed unused swipe gesture (+3 squashed commits)
Squashed commits: [d64bb3bb] Stop using the ServiceLocator directly in the ScreenTrackerViewModifier [37c46ab9] Rename Analytics to AnalyticsService [8852a371] #920 - Cleanup ServiceLocator usages
This commit is contained in:
committed by
Stefan Ceriu
parent
b4cd58b209
commit
e6711a0236
+1
-1
@@ -26,7 +26,7 @@ final class DeveloperOptionsScreenCoordinator: CoordinatorProtocol {
|
||||
var callback: ((DeveloperOptionsScreenCoordinatorAction) -> Void)?
|
||||
|
||||
init() {
|
||||
viewModel = DeveloperOptionsScreenViewModel()
|
||||
viewModel = DeveloperOptionsScreenViewModel(appSettings: ServiceLocator.shared.settings)
|
||||
viewModel.callback = { [weak self] action in
|
||||
switch action {
|
||||
case .clearCache:
|
||||
|
||||
+5
-4
@@ -19,12 +19,13 @@ import SwiftUI
|
||||
typealias DeveloperOptionsScreenViewModelType = StateStoreViewModel<DeveloperOptionsScreenViewState, DeveloperOptionsScreenViewAction>
|
||||
|
||||
class DeveloperOptionsScreenViewModel: DeveloperOptionsScreenViewModelType, DeveloperOptionsScreenViewModelProtocol {
|
||||
var callback: ((DeveloperOptionsScreenViewModelAction) -> Void)?
|
||||
|
||||
private let appSettings: AppSettings
|
||||
|
||||
init() {
|
||||
appSettings = ServiceLocator.shared.settings
|
||||
var callback: ((DeveloperOptionsScreenViewModelAction) -> Void)?
|
||||
|
||||
init(appSettings: AppSettings) {
|
||||
self.appSettings = appSettings
|
||||
|
||||
let bindings = DeveloperOptionsScreenViewStateBindings(shouldCollapseRoomStateEvents: appSettings.shouldCollapseRoomStateEvents,
|
||||
userSuggestionsEnabled: appSettings.userSuggestionsEnabled,
|
||||
readReceiptsEnabled: appSettings.readReceiptsEnabled,
|
||||
|
||||
+1
-1
@@ -105,7 +105,7 @@ struct DeveloperOptionsScreen: View {
|
||||
|
||||
struct DeveloperOptionsScreen_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
let viewModel = DeveloperOptionsScreenViewModel()
|
||||
let viewModel = DeveloperOptionsScreenViewModel(appSettings: ServiceLocator.shared.settings)
|
||||
DeveloperOptionsScreen(context: viewModel.context)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user