diff --git a/app/src/main/java/com/nextcloud/talk/activities/CallActivity.kt b/app/src/main/java/com/nextcloud/talk/activities/CallActivity.kt index 3d2b9a02e..44e1b4504 100644 --- a/app/src/main/java/com/nextcloud/talk/activities/CallActivity.kt +++ b/app/src/main/java/com/nextcloud/talk/activities/CallActivity.kt @@ -745,6 +745,7 @@ class CallActivity : CallBaseActivity() { binding!!.endCallPopupMenu.text = context.getString(R.string.leave_call) } + @Suppress("Detekt.TooGenericExceptionCaught") private fun createCameraEnumerator() { var camera2EnumeratorIsSupported = false try { diff --git a/app/src/main/java/com/nextcloud/talk/adapters/messages/IncomingDeckCardViewHolder.kt b/app/src/main/java/com/nextcloud/talk/adapters/messages/IncomingDeckCardViewHolder.kt index 149d818db..46cf1847f 100644 --- a/app/src/main/java/com/nextcloud/talk/adapters/messages/IncomingDeckCardViewHolder.kt +++ b/app/src/main/java/com/nextcloud/talk/adapters/messages/IncomingDeckCardViewHolder.kt @@ -180,6 +180,7 @@ class IncomingDeckCardViewHolder(incomingView: View, payload: Any) : MessageHold viewThemeUtils.talk.themeIncomingMessageBubble(bubble, message.isGrouped, message.isDeleted) } + @Suppress("Detekt.TooGenericExceptionCaught") private fun setParentMessageDataOnMessageItem(message: ChatMessage) { if (message.parentMessageId != null && !message.isDeleted) { CoroutineScope(Dispatchers.Main).launch { diff --git a/app/src/main/java/com/nextcloud/talk/adapters/messages/IncomingLinkPreviewMessageViewHolder.kt b/app/src/main/java/com/nextcloud/talk/adapters/messages/IncomingLinkPreviewMessageViewHolder.kt index b17a38da7..abcec3c31 100644 --- a/app/src/main/java/com/nextcloud/talk/adapters/messages/IncomingLinkPreviewMessageViewHolder.kt +++ b/app/src/main/java/com/nextcloud/talk/adapters/messages/IncomingLinkPreviewMessageViewHolder.kt @@ -158,6 +158,7 @@ class IncomingLinkPreviewMessageViewHolder(incomingView: View, payload: Any) : viewThemeUtils.talk.themeIncomingMessageBubble(bubble, message.isGrouped, message.isDeleted) } + @Suppress("Detekt.TooGenericExceptionCaught") private fun setParentMessageDataOnMessageItem(message: ChatMessage) { if (message.parentMessageId != null && !message.isDeleted) { CoroutineScope(Dispatchers.Main).launch { diff --git a/app/src/main/java/com/nextcloud/talk/adapters/messages/IncomingLocationMessageViewHolder.kt b/app/src/main/java/com/nextcloud/talk/adapters/messages/IncomingLocationMessageViewHolder.kt index d8f3d0a56..a03fd98a7 100644 --- a/app/src/main/java/com/nextcloud/talk/adapters/messages/IncomingLocationMessageViewHolder.kt +++ b/app/src/main/java/com/nextcloud/talk/adapters/messages/IncomingLocationMessageViewHolder.kt @@ -143,6 +143,7 @@ class IncomingLocationMessageViewHolder(incomingView: View, payload: Any) : viewThemeUtils.talk.themeIncomingMessageBubble(bubble, message.isGrouped, message.isDeleted) } + @Suppress("Detekt.TooGenericExceptionCaught") private fun setParentMessageDataOnMessageItem(message: ChatMessage) { if (message.parentMessageId != null && !message.isDeleted) { CoroutineScope(Dispatchers.Main).launch { diff --git a/app/src/main/java/com/nextcloud/talk/adapters/messages/IncomingPollMessageViewHolder.kt b/app/src/main/java/com/nextcloud/talk/adapters/messages/IncomingPollMessageViewHolder.kt index c121acc7f..997184a8f 100644 --- a/app/src/main/java/com/nextcloud/talk/adapters/messages/IncomingPollMessageViewHolder.kt +++ b/app/src/main/java/com/nextcloud/talk/adapters/messages/IncomingPollMessageViewHolder.kt @@ -165,6 +165,7 @@ class IncomingPollMessageViewHolder(incomingView: View, payload: Any) : viewThemeUtils.talk.themeIncomingMessageBubble(bubble, message.isGrouped, message.isDeleted) } + @Suppress("Detekt.TooGenericExceptionCaught") private fun setParentMessageDataOnMessageItem(message: ChatMessage) { if (message.parentMessageId != null && !message.isDeleted) { CoroutineScope(Dispatchers.Main).launch { diff --git a/app/src/main/java/com/nextcloud/talk/adapters/messages/IncomingTextMessageViewHolder.kt b/app/src/main/java/com/nextcloud/talk/adapters/messages/IncomingTextMessageViewHolder.kt index cb7175caa..e81ddf112 100644 --- a/app/src/main/java/com/nextcloud/talk/adapters/messages/IncomingTextMessageViewHolder.kt +++ b/app/src/main/java/com/nextcloud/talk/adapters/messages/IncomingTextMessageViewHolder.kt @@ -165,6 +165,7 @@ class IncomingTextMessageViewHolder(itemView: View, payload: Any) : viewThemeUtils.talk.themeIncomingMessageBubble(bubble, message.isGrouped, message.isDeleted) } + @Suppress("Detekt.TooGenericExceptionCaught") private fun processParentMessage(message: ChatMessage) { if (message.parentMessageId != null && !message.isDeleted) { CoroutineScope(Dispatchers.Main).launch { diff --git a/app/src/main/java/com/nextcloud/talk/adapters/messages/IncomingVoiceMessageViewHolder.kt b/app/src/main/java/com/nextcloud/talk/adapters/messages/IncomingVoiceMessageViewHolder.kt index f46b1f119..5f9763a5d 100644 --- a/app/src/main/java/com/nextcloud/talk/adapters/messages/IncomingVoiceMessageViewHolder.kt +++ b/app/src/main/java/com/nextcloud/talk/adapters/messages/IncomingVoiceMessageViewHolder.kt @@ -278,6 +278,7 @@ class IncomingVoiceMessageViewHolder(incomingView: View, payload: Any) : viewThemeUtils.talk.themeIncomingMessageBubble(bubble, message.isGrouped, message.isDeleted) } + @Suppress("Detekt.TooGenericExceptionCaught") private fun setParentMessageDataOnMessageItem(message: ChatMessage) { if (message.parentMessageId != null && !message.isDeleted) { CoroutineScope(Dispatchers.Main).launch { diff --git a/app/src/main/java/com/nextcloud/talk/adapters/messages/OutcomingDeckCardViewHolder.kt b/app/src/main/java/com/nextcloud/talk/adapters/messages/OutcomingDeckCardViewHolder.kt index 7c053f170..afb9058ac 100644 --- a/app/src/main/java/com/nextcloud/talk/adapters/messages/OutcomingDeckCardViewHolder.kt +++ b/app/src/main/java/com/nextcloud/talk/adapters/messages/OutcomingDeckCardViewHolder.kt @@ -171,6 +171,7 @@ class OutcomingDeckCardViewHolder( commonMessageInterface.onClickReaction(chatMessage, emoji) } + @Suppress("Detekt.TooGenericExceptionCaught") private fun setParentMessageDataOnMessageItem(message: ChatMessage) { if (message.parentMessageId != null && !message.isDeleted) { CoroutineScope(Dispatchers.Main).launch { diff --git a/app/src/main/java/com/nextcloud/talk/adapters/messages/OutcomingLinkPreviewMessageViewHolder.kt b/app/src/main/java/com/nextcloud/talk/adapters/messages/OutcomingLinkPreviewMessageViewHolder.kt index c22f16dbb..8d553dae3 100644 --- a/app/src/main/java/com/nextcloud/talk/adapters/messages/OutcomingLinkPreviewMessageViewHolder.kt +++ b/app/src/main/java/com/nextcloud/talk/adapters/messages/OutcomingLinkPreviewMessageViewHolder.kt @@ -146,6 +146,7 @@ class OutcomingLinkPreviewMessageViewHolder(outcomingView: View, payload: Any) : commonMessageInterface.onClickReaction(chatMessage, emoji) } + @Suppress("Detekt.TooGenericExceptionCaught") private fun setParentMessageDataOnMessageItem(message: ChatMessage) { if (message.parentMessageId != null && !message.isDeleted) { CoroutineScope(Dispatchers.Main).launch { diff --git a/app/src/main/java/com/nextcloud/talk/adapters/messages/OutcomingLocationMessageViewHolder.kt b/app/src/main/java/com/nextcloud/talk/adapters/messages/OutcomingLocationMessageViewHolder.kt index 7ae85a5c6..5d756c383 100644 --- a/app/src/main/java/com/nextcloud/talk/adapters/messages/OutcomingLocationMessageViewHolder.kt +++ b/app/src/main/java/com/nextcloud/talk/adapters/messages/OutcomingLocationMessageViewHolder.kt @@ -198,6 +198,7 @@ class OutcomingLocationMessageViewHolder(incomingView: View) : }) } + @Suppress("Detekt.TooGenericExceptionCaught") private fun setParentMessageDataOnMessageItem(message: ChatMessage) { if (message.parentMessageId != null && !message.isDeleted) { CoroutineScope(Dispatchers.Main).launch { diff --git a/app/src/main/java/com/nextcloud/talk/adapters/messages/OutcomingPollMessageViewHolder.kt b/app/src/main/java/com/nextcloud/talk/adapters/messages/OutcomingPollMessageViewHolder.kt index 951471dac..450f36a82 100644 --- a/app/src/main/java/com/nextcloud/talk/adapters/messages/OutcomingPollMessageViewHolder.kt +++ b/app/src/main/java/com/nextcloud/talk/adapters/messages/OutcomingPollMessageViewHolder.kt @@ -158,6 +158,7 @@ class OutcomingPollMessageViewHolder(outcomingView: View, payload: Any) : } } + @Suppress("Detekt.TooGenericExceptionCaught") private fun setParentMessageDataOnMessageItem(message: ChatMessage) { if (message.parentMessageId != null && !message.isDeleted) { CoroutineScope(Dispatchers.Main).launch { diff --git a/app/src/main/java/com/nextcloud/talk/adapters/messages/OutcomingTextMessageViewHolder.kt b/app/src/main/java/com/nextcloud/talk/adapters/messages/OutcomingTextMessageViewHolder.kt index 68e2c515d..f1dc83286 100644 --- a/app/src/main/java/com/nextcloud/talk/adapters/messages/OutcomingTextMessageViewHolder.kt +++ b/app/src/main/java/com/nextcloud/talk/adapters/messages/OutcomingTextMessageViewHolder.kt @@ -157,6 +157,7 @@ class OutcomingTextMessageViewHolder(itemView: View) : commonMessageInterface.onClickReaction(chatMessage, emoji) } + @Suppress("Detekt.TooGenericExceptionCaught") private fun processParentMessage(message: ChatMessage) { if (message.parentMessageId != null && !message.isDeleted) { CoroutineScope(Dispatchers.Main).launch { diff --git a/app/src/main/java/com/nextcloud/talk/adapters/messages/OutcomingVoiceMessageViewHolder.kt b/app/src/main/java/com/nextcloud/talk/adapters/messages/OutcomingVoiceMessageViewHolder.kt index b9cd43629..43803c5aa 100644 --- a/app/src/main/java/com/nextcloud/talk/adapters/messages/OutcomingVoiceMessageViewHolder.kt +++ b/app/src/main/java/com/nextcloud/talk/adapters/messages/OutcomingVoiceMessageViewHolder.kt @@ -283,6 +283,7 @@ class OutcomingVoiceMessageViewHolder(outcomingView: View) : binding.progressBar.visibility = View.VISIBLE } + @Suppress("Detekt.TooGenericExceptionCaught") private fun setParentMessageDataOnMessageItem(message: ChatMessage) { if (message.parentMessageId != null && !message.isDeleted) { CoroutineScope(Dispatchers.Main).launch { diff --git a/app/src/main/java/com/nextcloud/talk/adapters/messages/TemporaryMessageViewHolder.kt b/app/src/main/java/com/nextcloud/talk/adapters/messages/TemporaryMessageViewHolder.kt index d684ac6c5..73552c8c7 100644 --- a/app/src/main/java/com/nextcloud/talk/adapters/messages/TemporaryMessageViewHolder.kt +++ b/app/src/main/java/com/nextcloud/talk/adapters/messages/TemporaryMessageViewHolder.kt @@ -112,6 +112,7 @@ class TemporaryMessageViewHolder(outgoingView: View, payload: Any) : ViewCompat.setBackground(bubble, bubbleDrawable) } + @Suppress("Detekt.TooGenericExceptionCaught") private fun processParentMessage(message: ChatMessage) { if (message.parentMessageId != null && !message.isDeleted) { CoroutineScope(Dispatchers.Main).launch { diff --git a/app/src/main/java/com/nextcloud/talk/chat/data/network/OfflineFirstChatRepository.kt b/app/src/main/java/com/nextcloud/talk/chat/data/network/OfflineFirstChatRepository.kt index e29628866..bf3a9f7fa 100644 --- a/app/src/main/java/com/nextcloud/talk/chat/data/network/OfflineFirstChatRepository.kt +++ b/app/src/main/java/com/nextcloud/talk/chat/data/network/OfflineFirstChatRepository.kt @@ -399,7 +399,7 @@ class OfflineFirstChatRepository @Inject constructor( .map(ChatMessageEntity::asModel) } - @Suppress("UNCHECKED_CAST", "MagicNumber") + @Suppress("UNCHECKED_CAST", "MagicNumber", "Detekt.TooGenericExceptionCaught") private fun getMessagesFromServer(bundle: Bundle): Pair>? { val fieldMap = bundle.getSerializable(BundleKeys.KEY_FIELD_MAP) as HashMap diff --git a/app/src/main/java/com/nextcloud/talk/contacts/ContactsViewModel.kt b/app/src/main/java/com/nextcloud/talk/contacts/ContactsViewModel.kt index b045dd11a..049646f05 100644 --- a/app/src/main/java/com/nextcloud/talk/contacts/ContactsViewModel.kt +++ b/app/src/main/java/com/nextcloud/talk/contacts/ContactsViewModel.kt @@ -69,6 +69,7 @@ class ContactsViewModel @Inject constructor( _isAddParticipantsView.value = value } + @Suppress("Detekt.TooGenericExceptionCaught") fun getContactsFromSearchParams() { _contactsViewState.value = ContactsUiState.Loading viewModelScope.launch { @@ -84,6 +85,8 @@ class ContactsViewModel @Inject constructor( } } } + + @Suppress("Detekt.TooGenericExceptionCaught") fun createRoom(roomType: String, sourceType: String, userId: String, conversationName: String?) { viewModelScope.launch { try { diff --git a/app/src/main/java/com/nextcloud/talk/conversationcreation/ConversationCreationViewModel.kt b/app/src/main/java/com/nextcloud/talk/conversationcreation/ConversationCreationViewModel.kt index 66421bb54..239bedf3f 100644 --- a/app/src/main/java/com/nextcloud/talk/conversationcreation/ConversationCreationViewModel.kt +++ b/app/src/main/java/com/nextcloud/talk/conversationcreation/ConversationCreationViewModel.kt @@ -75,6 +75,7 @@ class ConversationCreationViewModel @Inject constructor( _conversationDescription.value = conversationDescription } + @Suppress("Detekt.TooGenericExceptionCaught") fun createRoomAndAddParticipants( roomType: String, conversationName: String, @@ -142,6 +143,7 @@ class ConversationCreationViewModel @Inject constructor( return repository.getImageUri(avatarId, requestBigSize) } + @Suppress("Detekt.TooGenericExceptionCaught") fun createRoom(roomType: String, conversationName: String?) { viewModelScope.launch { try { diff --git a/app/src/main/java/com/nextcloud/talk/conversationinfo/viewmodel/ConversationInfoViewModel.kt b/app/src/main/java/com/nextcloud/talk/conversationinfo/viewmodel/ConversationInfoViewModel.kt index 10f395026..f6debb14f 100644 --- a/app/src/main/java/com/nextcloud/talk/conversationinfo/viewmodel/ConversationInfoViewModel.kt +++ b/app/src/main/java/com/nextcloud/talk/conversationinfo/viewmodel/ConversationInfoViewModel.kt @@ -150,6 +150,7 @@ class ConversationInfoViewModel @Inject constructor( } } + @Suppress("Detekt.TooGenericExceptionCaught") fun listBans(user: User, token: String) { val url = ApiUtils.getUrlForBans(user.baseUrl!!, token) viewModelScope.launch { @@ -163,6 +164,7 @@ class ConversationInfoViewModel @Inject constructor( } } + @Suppress("Detekt.TooGenericExceptionCaught") fun banActor(user: User, token: String, actorType: String, actorId: String, internalNote: String) { val url = ApiUtils.getUrlForBans(user.baseUrl!!, token) viewModelScope.launch { @@ -182,6 +184,7 @@ class ConversationInfoViewModel @Inject constructor( } } + @Suppress("Detekt.TooGenericExceptionCaught") fun setConversationReadOnly(roomToken: String, state: Int) { viewModelScope.launch { try { @@ -193,6 +196,7 @@ class ConversationInfoViewModel @Inject constructor( } } + @Suppress("Detekt.TooGenericExceptionCaught") fun unbanActor(user: User, token: String, banId: Int) { val url = ApiUtils.getUrlForUnban(user.baseUrl!!, token, banId) viewModelScope.launch { @@ -206,6 +210,7 @@ class ConversationInfoViewModel @Inject constructor( } } + @Suppress("Detekt.TooGenericExceptionCaught") fun allowGuests(token: String, allow: Boolean) { viewModelScope.launch { try { @@ -217,6 +222,7 @@ class ConversationInfoViewModel @Inject constructor( } } + @Suppress("Detekt.TooGenericExceptionCaught") @SuppressLint("SuspiciousIndentation") fun setPassword(password: String, token: String) { viewModelScope.launch { @@ -241,6 +247,7 @@ class ConversationInfoViewModel @Inject constructor( conversationsRepository.unarchiveConversation(user.getCredentials(), url) } + @Suppress("Detekt.TooGenericExceptionCaught") fun clearChatHistory(apiVersion: Int, roomToken: String) { viewModelScope.launch { try { diff --git a/app/src/main/java/com/nextcloud/talk/conversationinfoedit/viewmodel/ConversationInfoEditViewModel.kt b/app/src/main/java/com/nextcloud/talk/conversationinfoedit/viewmodel/ConversationInfoEditViewModel.kt index 29d171f05..f62bba524 100644 --- a/app/src/main/java/com/nextcloud/talk/conversationinfoedit/viewmodel/ConversationInfoEditViewModel.kt +++ b/app/src/main/java/com/nextcloud/talk/conversationinfoedit/viewmodel/ConversationInfoEditViewModel.kt @@ -75,6 +75,7 @@ class ConversationInfoEditViewModel @Inject constructor( ?.subscribe(DeleteConversationAvatarObserver()) } + @Suppress("Detekt.TooGenericExceptionCaught") fun renameRoom(roomToken: String, newRoomName: String) { viewModelScope.launch { try { @@ -86,6 +87,7 @@ class ConversationInfoEditViewModel @Inject constructor( } } + @Suppress("Detekt.TooGenericExceptionCaught") fun setConversationDescription(roomToken: String, conversationDescription: String?) { viewModelScope.launch { try { diff --git a/app/src/main/java/com/nextcloud/talk/conversationlist/data/network/OfflineFirstConversationsRepository.kt b/app/src/main/java/com/nextcloud/talk/conversationlist/data/network/OfflineFirstConversationsRepository.kt index f02eeff40..f2d30a83b 100644 --- a/app/src/main/java/com/nextcloud/talk/conversationlist/data/network/OfflineFirstConversationsRepository.kt +++ b/app/src/main/java/com/nextcloud/talk/conversationlist/data/network/OfflineFirstConversationsRepository.kt @@ -102,6 +102,7 @@ class OfflineFirstConversationsRepository @Inject constructor( } } + @Suppress("Detekt.TooGenericExceptionCaught") private suspend fun getRoomsFromServer(): List? { var conversationsFromSync: List? = null diff --git a/app/src/main/java/com/nextcloud/talk/data/source/local/converters/ArrayListConverter.kt b/app/src/main/java/com/nextcloud/talk/data/source/local/converters/ArrayListConverter.kt index 8474102c6..1b3aeccdc 100644 --- a/app/src/main/java/com/nextcloud/talk/data/source/local/converters/ArrayListConverter.kt +++ b/app/src/main/java/com/nextcloud/talk/data/source/local/converters/ArrayListConverter.kt @@ -13,6 +13,7 @@ import com.bluelinelabs.logansquare.LoganSquare class ArrayListConverter { + @Suppress("Detekt.TooGenericExceptionCaught") @TypeConverter fun arrayListToString(list: ArrayList?): String? { return if (list == null) { diff --git a/app/src/main/java/com/nextcloud/talk/jobs/SaveFileToStorageWorker.kt b/app/src/main/java/com/nextcloud/talk/jobs/SaveFileToStorageWorker.kt index 346bd9401..cb6e08cc7 100644 --- a/app/src/main/java/com/nextcloud/talk/jobs/SaveFileToStorageWorker.kt +++ b/app/src/main/java/com/nextcloud/talk/jobs/SaveFileToStorageWorker.kt @@ -36,6 +36,7 @@ import java.net.URLConnection class SaveFileToStorageWorker(val context: Context, workerParameters: WorkerParameters) : Worker(context, workerParameters) { + @Suppress("Detekt.TooGenericExceptionCaught") override fun doWork(): Result { try { val sourceFilePath = inputData.getString(KEY_SOURCE_FILE_PATH) diff --git a/app/src/main/java/com/nextcloud/talk/settings/SettingsActivity.kt b/app/src/main/java/com/nextcloud/talk/settings/SettingsActivity.kt index 11217b80e..0eae35688 100644 --- a/app/src/main/java/com/nextcloud/talk/settings/SettingsActivity.kt +++ b/app/src/main/java/com/nextcloud/talk/settings/SettingsActivity.kt @@ -1130,6 +1130,7 @@ class SettingsActivity : } } + @Suppress("Detekt.TooGenericExceptionCaught") override fun onRequestPermissionsResult(requestCode: Int, permissions: Array, grantResults: IntArray) { super.onRequestPermissionsResult(requestCode, permissions, grantResults) @@ -1349,6 +1350,7 @@ class SettingsActivity : }) } + @Suppress("Detekt.TooGenericExceptionCaught") private fun observeReadPrivacy() { lifecycleScope.launch { var state = appPreferences.readPrivacy @@ -1384,6 +1386,7 @@ class SettingsActivity : } } + @Suppress("Detekt.TooGenericExceptionCaught") private fun observeTypingStatus() { lifecycleScope.launch { var state = appPreferences.typingStatus diff --git a/app/src/main/java/com/nextcloud/talk/ui/dialog/ConversationsListBottomDialog.kt b/app/src/main/java/com/nextcloud/talk/ui/dialog/ConversationsListBottomDialog.kt index 6a33abb7f..3149e153b 100644 --- a/app/src/main/java/com/nextcloud/talk/ui/dialog/ConversationsListBottomDialog.kt +++ b/app/src/main/java/com/nextcloud/talk/ui/dialog/ConversationsListBottomDialog.kt @@ -202,6 +202,7 @@ class ConversationsListBottomDialog( } } + @Suppress("Detekt.TooGenericExceptionCaught") @SuppressLint("StringFormatInvalid", "TooGenericExceptionCaught") private fun addConversationToFavorites() { val apiVersion = ApiUtils.getConversationApiVersion(currentUser, intArrayOf(ApiUtils.API_V4, ApiUtils.API_V1)) @@ -228,6 +229,7 @@ class ConversationsListBottomDialog( } } + @Suppress("Detekt.TooGenericExceptionCaught") @SuppressLint("StringFormatInvalid", "TooGenericExceptionCaught") private fun removeConversationFromFavorites() { val apiVersion = ApiUtils.getConversationApiVersion(currentUser, intArrayOf(ApiUtils.API_V4, ApiUtils.API_V1)) diff --git a/app/src/main/java/com/nextcloud/talk/utils/preferences/AppPreferencesImpl.kt b/app/src/main/java/com/nextcloud/talk/utils/preferences/AppPreferencesImpl.kt index 23dc371ca..c1e611b9a 100644 --- a/app/src/main/java/com/nextcloud/talk/utils/preferences/AppPreferencesImpl.kt +++ b/app/src/main/java/com/nextcloud/talk/utils/preferences/AppPreferencesImpl.kt @@ -522,6 +522,7 @@ class AppPreferencesImpl(val context: Context) : AppPreferences { } } + @Suppress("Detekt.TooGenericExceptionCaught") override fun getMessageQueue(internalConversationId: String): MutableList { val queueStr = runBlocking { async { readString(internalConversationId + MESSAGE_QUEUE).first() } }.getCompleted() diff --git a/app/src/main/java/com/nextcloud/talk/utils/preferences/preferencestorage/DatabaseStorageModule.kt b/app/src/main/java/com/nextcloud/talk/utils/preferences/preferencestorage/DatabaseStorageModule.kt index 3423e424f..17b2be700 100644 --- a/app/src/main/java/com/nextcloud/talk/utils/preferences/preferencestorage/DatabaseStorageModule.kt +++ b/app/src/main/java/com/nextcloud/talk/utils/preferences/preferencestorage/DatabaseStorageModule.kt @@ -8,7 +8,6 @@ */ package com.nextcloud.talk.utils.preferences.preferencestorage -import android.annotation.SuppressLint import android.text.TextUtils import android.util.Log import autodagger.AutoInjector @@ -64,7 +63,7 @@ class DatabaseStorageModule(conversationUser: User, conversationToken: String) { this.conversationToken = conversationToken } - @SuppressLint("TooGenericExceptionCaught") + @Suppress("Detekt.TooGenericExceptionCaught") suspend fun saveBoolean(key: String, value: Boolean) { if ("call_notifications_switch" == key) { val apiVersion = getConversationApiVersion(conversationUser, intArrayOf(ApiUtils.API_V4)) @@ -92,7 +91,7 @@ class DatabaseStorageModule(conversationUser: User, conversationToken: String) { } } - @SuppressLint("TooGenericExceptionCaught") + @Suppress("Detekt.TooGenericExceptionCaught") suspend fun saveString(key: String, value: String) { when (key) { "conversation_settings_dropdown" -> { diff --git a/detekt.yml b/detekt.yml index 62d1c5ea1..e2620122b 100644 --- a/detekt.yml +++ b/detekt.yml @@ -1,7 +1,7 @@ # SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors # SPDX-License-Identifier: GPL-3.0-or-later build: - maxIssues: 167 + maxIssues: 125 weights: # complexity: 2 # LongParameterList: 1