From b0ba8a118e11218964f811eb6714850c0004e7aa Mon Sep 17 00:00:00 2001 From: joragua Date: Tue, 26 Nov 2024 10:18:37 +0100 Subject: [PATCH] refactor: removed unnecessary get in `ViewModelModule` and Ktlint changes --- .../com/owncloud/android/dependecyinjection/ViewModelModule.kt | 2 +- .../android/data/spaces/repository/OCSpacesRepository.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/owncloudApp/src/main/java/com/owncloud/android/dependecyinjection/ViewModelModule.kt b/owncloudApp/src/main/java/com/owncloud/android/dependecyinjection/ViewModelModule.kt index 0dbc8bd07ff..5a5abd60001 100644 --- a/owncloudApp/src/main/java/com/owncloud/android/dependecyinjection/ViewModelModule.kt +++ b/owncloudApp/src/main/java/com/owncloud/android/dependecyinjection/ViewModelModule.kt @@ -97,7 +97,7 @@ val viewModelModule = module { viewModel { AuthenticationViewModel(get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get()) } viewModel { MigrationViewModel(MainApp.dataFolder, get(), get(), get(), get(), get(), get(), get()) } viewModel { TransfersViewModel(get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get()) } - viewModel { ReceiveExternalFilesViewModel(get(), get(), get(), get()) } + viewModel { ReceiveExternalFilesViewModel(get(), get(), get()) } viewModel { (accountName: String, showPersonalSpace: Boolean) -> SpacesListViewModel(get(), get(), get(), get(), get(), accountName, showPersonalSpace) } diff --git a/owncloudData/src/main/java/com/owncloud/android/data/spaces/repository/OCSpacesRepository.kt b/owncloudData/src/main/java/com/owncloud/android/data/spaces/repository/OCSpacesRepository.kt index 3201e32e106..63fdf11d44e 100644 --- a/owncloudData/src/main/java/com/owncloud/android/data/spaces/repository/OCSpacesRepository.kt +++ b/owncloudData/src/main/java/com/owncloud/android/data/spaces/repository/OCSpacesRepository.kt @@ -45,7 +45,7 @@ class OCSpacesRepository( } else { UserQuota(accountName, it.quota?.remaining!!, it.quota?.used!!, it.quota?.total!!, UserQuotaState.fromValue(it.quota?.state!!)) } - } ?: UserQuota (accountName, -4, 0, 0, UserQuotaState.NORMAL) + } ?: UserQuota(accountName, -4, 0, 0, UserQuotaState.NORMAL) localUserDataSource.saveQuotaForAccount(accountName, userQuota) } }