From 573ec29829ffe64d3bf7acd897d7355f06a1b027 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 7 Oct 2020 19:10:53 +0200 Subject: [PATCH] ktlint cleanup --- .../src/main/java/im/vector/lib/multipicker/CameraPicker.kt | 1 - .../gplay/features/settings/troubleshoot/TestFirebaseToken.kt | 1 - .../java/im/vector/app/core/utils/ExternalApplicationsUtil.kt | 1 - .../crypto/keysbackup/setup/KeysBackupSetupStep3Fragment.kt | 1 - .../features/crypto/verification/VerificationBottomSheet.kt | 1 - .../app/features/discovery/DiscoverySettingsFragment.kt | 1 - .../app/features/home/room/detail/RoomDetailFragment.kt | 3 +-- .../main/java/im/vector/app/features/navigation/Navigator.kt | 1 - .../app/features/settings/VectorSettingsGeneralFragment.kt | 4 ++-- .../settings/VectorSettingsNotificationPreferenceFragment.kt | 1 - .../settings/VectorSettingsSecurityPrivacyFragment.kt | 3 ++- 11 files changed, 5 insertions(+), 13 deletions(-) diff --git a/multipicker/src/main/java/im/vector/lib/multipicker/CameraPicker.kt b/multipicker/src/main/java/im/vector/lib/multipicker/CameraPicker.kt index e70e3c574f..3f24a28c28 100644 --- a/multipicker/src/main/java/im/vector/lib/multipicker/CameraPicker.kt +++ b/multipicker/src/main/java/im/vector/lib/multipicker/CameraPicker.kt @@ -16,7 +16,6 @@ package im.vector.lib.multipicker -import android.app.Activity import android.content.Context import android.content.Intent import android.net.Uri diff --git a/vector/src/gplay/java/im/vector/app/gplay/features/settings/troubleshoot/TestFirebaseToken.kt b/vector/src/gplay/java/im/vector/app/gplay/features/settings/troubleshoot/TestFirebaseToken.kt index 46bdb7967a..32888dafd7 100644 --- a/vector/src/gplay/java/im/vector/app/gplay/features/settings/troubleshoot/TestFirebaseToken.kt +++ b/vector/src/gplay/java/im/vector/app/gplay/features/settings/troubleshoot/TestFirebaseToken.kt @@ -22,7 +22,6 @@ import com.google.firebase.iid.FirebaseInstanceId import im.vector.app.R import im.vector.app.core.resources.StringProvider import im.vector.app.core.utils.startAddGoogleAccountIntent -import im.vector.app.features.settings.troubleshoot.NotificationTroubleshootTestManager import im.vector.app.features.settings.troubleshoot.TroubleshootTest import im.vector.app.push.fcm.FcmHelper import timber.log.Timber diff --git a/vector/src/main/java/im/vector/app/core/utils/ExternalApplicationsUtil.kt b/vector/src/main/java/im/vector/app/core/utils/ExternalApplicationsUtil.kt index 8c415c7184..1e19a1231a 100644 --- a/vector/src/main/java/im/vector/app/core/utils/ExternalApplicationsUtil.kt +++ b/vector/src/main/java/im/vector/app/core/utils/ExternalApplicationsUtil.kt @@ -37,7 +37,6 @@ import androidx.browser.customtabs.CustomTabsSession import androidx.core.content.ContextCompat import androidx.core.content.FileProvider import androidx.core.content.getSystemService -import androidx.fragment.app.Fragment import im.vector.app.BuildConfig import im.vector.app.R import im.vector.app.features.notifications.NotificationUtils diff --git a/vector/src/main/java/im/vector/app/features/crypto/keysbackup/setup/KeysBackupSetupStep3Fragment.kt b/vector/src/main/java/im/vector/app/features/crypto/keysbackup/setup/KeysBackupSetupStep3Fragment.kt index d357625bcc..78471c6848 100644 --- a/vector/src/main/java/im/vector/app/features/crypto/keysbackup/setup/KeysBackupSetupStep3Fragment.kt +++ b/vector/src/main/java/im/vector/app/features/crypto/keysbackup/setup/KeysBackupSetupStep3Fragment.kt @@ -16,7 +16,6 @@ package im.vector.app.features.crypto.keysbackup.setup import android.app.Activity -import android.content.Intent import android.net.Uri import android.os.Bundle import android.view.View diff --git a/vector/src/main/java/im/vector/app/features/crypto/verification/VerificationBottomSheet.kt b/vector/src/main/java/im/vector/app/features/crypto/verification/VerificationBottomSheet.kt index d91194e002..35ea96de6f 100644 --- a/vector/src/main/java/im/vector/app/features/crypto/verification/VerificationBottomSheet.kt +++ b/vector/src/main/java/im/vector/app/features/crypto/verification/VerificationBottomSheet.kt @@ -17,7 +17,6 @@ package im.vector.app.features.crypto.verification import android.app.Activity import android.app.Dialog -import android.content.Intent import android.os.Bundle import android.os.Parcelable import android.view.KeyEvent diff --git a/vector/src/main/java/im/vector/app/features/discovery/DiscoverySettingsFragment.kt b/vector/src/main/java/im/vector/app/features/discovery/DiscoverySettingsFragment.kt index 7dd32a7cd0..145dfc56c3 100644 --- a/vector/src/main/java/im/vector/app/features/discovery/DiscoverySettingsFragment.kt +++ b/vector/src/main/java/im/vector/app/features/discovery/DiscoverySettingsFragment.kt @@ -36,7 +36,6 @@ import org.matrix.android.sdk.api.session.identity.SharedState import org.matrix.android.sdk.api.session.identity.ThreePid import org.matrix.android.sdk.api.session.terms.TermsService import kotlinx.android.synthetic.main.fragment_generic_recycler.* -import timber.log.Timber import javax.inject.Inject class DiscoverySettingsFragment @Inject constructor( diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailFragment.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailFragment.kt index 61041aa70f..66e49cf060 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailFragment.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailFragment.kt @@ -361,7 +361,7 @@ class RoomDetailFragment @Inject constructor( }.exhaustive } - if(savedInstanceState == null) { + if (savedInstanceState == null) { handleShareData() } } @@ -798,7 +798,6 @@ class RoomDetailFragment @Inject constructor( } } - private fun safeStartCall2(isVideoCall: Boolean) { val startCallAction = RoomDetailAction.StartCall(isVideoCall) roomDetailViewModel.pendingAction = startCallAction diff --git a/vector/src/main/java/im/vector/app/features/navigation/Navigator.kt b/vector/src/main/java/im/vector/app/features/navigation/Navigator.kt index 05cba654f2..1d01a5e4f0 100644 --- a/vector/src/main/java/im/vector/app/features/navigation/Navigator.kt +++ b/vector/src/main/java/im/vector/app/features/navigation/Navigator.kt @@ -24,7 +24,6 @@ import androidx.activity.result.ActivityResultLauncher import androidx.core.util.Pair import im.vector.app.features.crypto.recover.SetupMode import im.vector.app.features.media.AttachmentData -import im.vector.app.features.pin.PinActivity import im.vector.app.features.pin.PinMode import im.vector.app.features.roomdirectory.roompreview.RoomPreviewData import im.vector.app.features.settings.VectorSettingsActivity diff --git a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsGeneralFragment.kt b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsGeneralFragment.kt index 3f7ddbb9c8..dfae073e7e 100644 --- a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsGeneralFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsGeneralFragment.kt @@ -279,7 +279,7 @@ class VectorSettingsGeneralFragment : VectorSettingsBaseFragment() { session.integrationManagerService().removeListener(integrationServiceListener) } - private val attachmentPhotoActivityResultLauncher = registerStartForActivityResult {activityResult -> + private val attachmentPhotoActivityResultLauncher = registerStartForActivityResult { activityResult -> if (activityResult.resultCode == Activity.RESULT_OK) { avatarCameraUri?.let { uri -> MultiPicker.get(MultiPicker.CAMERA) @@ -291,7 +291,7 @@ class VectorSettingsGeneralFragment : VectorSettingsBaseFragment() { } } - private val attachmentImageActivityResultLauncher = registerStartForActivityResult {activityResult -> + private val attachmentImageActivityResultLauncher = registerStartForActivityResult { activityResult -> val data = activityResult.data ?: return@registerStartForActivityResult if (activityResult.resultCode == Activity.RESULT_OK) { MultiPicker diff --git a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsNotificationPreferenceFragment.kt b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsNotificationPreferenceFragment.kt index fdff5253d5..4bee1ac0c8 100644 --- a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsNotificationPreferenceFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsNotificationPreferenceFragment.kt @@ -119,7 +119,6 @@ class VectorSettingsNotificationPreferenceFragment @Inject constructor( // Noop } - // BackgroundSyncModeChooserDialog.InteractionListener override fun onOptionSelected(mode: BackgroundSyncMode) { // option has change, need to act diff --git a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsSecurityPrivacyFragment.kt b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsSecurityPrivacyFragment.kt index 39120f1157..457fc00273 100644 --- a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsSecurityPrivacyFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsSecurityPrivacyFragment.kt @@ -322,7 +322,7 @@ class VectorSettingsSecurityPrivacyFragment @Inject constructor( private val saveMegolmStartForActivityResult = registerStartForActivityResult { val uri = it.data?.data ?: return@registerStartForActivityResult - if (it.resultCode == Activity.RESULT_OK) + if (it.resultCode == Activity.RESULT_OK) { ExportKeysDialog().show(requireActivity(), object : ExportKeysDialog.ExportKeyDialogListener { override fun onPassphrase(passphrase: String) { displayLoadingView() @@ -347,6 +347,7 @@ class VectorSettingsSecurityPrivacyFragment @Inject constructor( }) } }) + } } private val pinActivityResultLauncher = registerStartForActivityResult {