From d9550175e82e9dd58b1a7f8ff6d7ff452a9d1d9e Mon Sep 17 00:00:00 2001 From: ZetaTom <70907959+ZetaTom@users.noreply.github.com> Date: Tue, 12 Nov 2024 10:44:54 +0100 Subject: [PATCH] Reformat code Signed-off-by: ZetaTom <70907959+ZetaTom@users.noreply.github.com> --- .../ui/ChooseStorageLocationDialogFragment.kt | 11 +++++++---- .../ui/activity/ChooseStorageLocationActivity.kt | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/nextcloud/ui/ChooseStorageLocationDialogFragment.kt b/app/src/main/java/com/nextcloud/ui/ChooseStorageLocationDialogFragment.kt index aedea6993d..4fef745909 100644 --- a/app/src/main/java/com/nextcloud/ui/ChooseStorageLocationDialogFragment.kt +++ b/app/src/main/java/com/nextcloud/ui/ChooseStorageLocationDialogFragment.kt @@ -102,7 +102,8 @@ class ChooseStorageLocationDialogFragment : DialogFragment(), Injectable { StorageType.EXTERNAL -> getString(R.string.storage_external_storage) } - val storagePath = storagePoints.firstOrNull { it.storageType == storageType && it.privacyType == privacyType }?.path + val storagePath = + storagePoints.firstOrNull { it.storageType == storageType && it.privacyType == privacyType }?.path return storagePath?.let { val file = File(it) @@ -118,7 +119,8 @@ class ChooseStorageLocationDialogFragment : DialogFragment(), Injectable { } private fun updateMediaIndexSwitch() { - val privacyTypes = storagePoints.filter { it.storageType == selectedStorageType }.map { it.privacyType }.distinct() + val privacyTypes = + storagePoints.filter { it.storageType == selectedStorageType }.map { it.privacyType }.distinct() binding.allowMediaIndexSwitch.isEnabled = privacyTypes.size > 1 binding.allowMediaIndexSwitch.isChecked = privacyTypes.contains(PrivacyType.PUBLIC) } @@ -142,7 +144,8 @@ class ChooseStorageLocationDialogFragment : DialogFragment(), Injectable { } private fun notifyResult() { - val newPath = storagePoints.first { it.storageType == selectedStorageType && it.privacyType == selectedPrivacyType } + val newPath = + storagePoints.first { it.storageType == selectedStorageType && it.privacyType == selectedPrivacyType } val resultBundle = Bundle().apply { putString(KEY_RESULT_STORAGE_LOCATION, newPath.path) @@ -161,4 +164,4 @@ class ChooseStorageLocationDialogFragment : DialogFragment(), Injectable { @JvmStatic val TAG: String = Companion::class.java.simpleName } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/owncloud/android/ui/activity/ChooseStorageLocationActivity.kt b/app/src/main/java/com/owncloud/android/ui/activity/ChooseStorageLocationActivity.kt index 10180e5247..8d13d53e7d 100644 --- a/app/src/main/java/com/owncloud/android/ui/activity/ChooseStorageLocationActivity.kt +++ b/app/src/main/java/com/owncloud/android/ui/activity/ChooseStorageLocationActivity.kt @@ -26,7 +26,7 @@ class ChooseStorageLocationActivity : AppCompatActivity() { Intent().putExtra( KEY_RESULT_STORAGE_LOCATION, result.getString(KEY_RESULT_STORAGE_LOCATION) - ) + ) ) } chooseStorageLocationDialogFragment.show(supportFragmentManager, "choose_storage_location") @@ -35,4 +35,4 @@ class ChooseStorageLocationActivity : AppCompatActivity() { companion object { const val KEY_RESULT_STORAGE_LOCATION = ChooseStorageLocationDialogFragment.KEY_RESULT_STORAGE_LOCATION } -} \ No newline at end of file +}