diff --git a/app/src/main/java/com/nextcloud/client/assistant/AsssistantScreen.kt b/app/src/main/java/com/nextcloud/client/assistant/AsssistantScreen.kt index 69e44ef6f6..5d4c9520f3 100644 --- a/app/src/main/java/com/nextcloud/client/assistant/AsssistantScreen.kt +++ b/app/src/main/java/com/nextcloud/client/assistant/AsssistantScreen.kt @@ -64,6 +64,7 @@ import com.owncloud.android.lib.resources.assistant.model.TaskType import com.owncloud.android.utils.DisplayUtils import kotlinx.coroutines.delay +@Suppress("LongMethod") @OptIn(ExperimentalMaterial3Api::class) @Composable fun AssistantScreen(viewModel: AssistantViewModel) { @@ -81,6 +82,7 @@ fun AssistantScreen(viewModel: AssistantViewModel) { } val pullRefreshState = rememberPullToRefreshState() + @Suppress("MagicNumber") if (pullRefreshState.isRefreshing) { LaunchedEffect(true) { delay(1500) diff --git a/app/src/main/java/com/nextcloud/client/assistant/component/TaskView.kt b/app/src/main/java/com/nextcloud/client/assistant/component/TaskView.kt index e92aa0630e..4069c57d05 100644 --- a/app/src/main/java/com/nextcloud/client/assistant/component/TaskView.kt +++ b/app/src/main/java/com/nextcloud/client/assistant/component/TaskView.kt @@ -52,6 +52,7 @@ import com.owncloud.android.lib.resources.assistant.model.Task @OptIn(ExperimentalFoundationApi::class) @SuppressLint("ResourceAsColor") +@Suppress("LongMethod", "MagicNumber") @Composable fun TaskView( task: Task, diff --git a/app/src/main/java/com/nextcloud/ui/composeActivity/ComposeActivity.kt b/app/src/main/java/com/nextcloud/ui/composeActivity/ComposeActivity.kt index 8c67f73196..6112fbe296 100644 --- a/app/src/main/java/com/nextcloud/ui/composeActivity/ComposeActivity.kt +++ b/app/src/main/java/com/nextcloud/ui/composeActivity/ComposeActivity.kt @@ -100,13 +100,14 @@ class ComposeActivity : DrawerActivity() { nextcloudClient = getNextcloudClient(user, context) } - return if (destination == ComposeDestination.AssistantScreen && nextcloudClient != null) { - AssistantScreen( - viewModel = AssistantViewModel( - client = nextcloudClient!! + if (destination == ComposeDestination.AssistantScreen) { + nextcloudClient?.let { + AssistantScreen( + viewModel = AssistantViewModel( + client = it + ) ) - ) - } else { + } } } diff --git a/app/src/main/java/com/nextcloud/ui/composeComponents/alertDialog/SimpleAlertDialog.kt b/app/src/main/java/com/nextcloud/ui/composeComponents/alertDialog/SimpleAlertDialog.kt index fc47fe5307..d7f5ba3508 100644 --- a/app/src/main/java/com/nextcloud/ui/composeComponents/alertDialog/SimpleAlertDialog.kt +++ b/app/src/main/java/com/nextcloud/ui/composeComponents/alertDialog/SimpleAlertDialog.kt @@ -36,6 +36,7 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp import com.owncloud.android.R +@Suppress("LongParameterList") @Composable fun SimpleAlertDialog( backgroundColor: Color, diff --git a/app/src/main/java/com/owncloud/android/ui/activity/SyncedFoldersActivity.kt b/app/src/main/java/com/owncloud/android/ui/activity/SyncedFoldersActivity.kt index 55cf725a00..c4aa216d4d 100644 --- a/app/src/main/java/com/owncloud/android/ui/activity/SyncedFoldersActivity.kt +++ b/app/src/main/java/com/owncloud/android/ui/activity/SyncedFoldersActivity.kt @@ -80,7 +80,7 @@ import javax.inject.Inject /** * Activity displaying all auto-synced folders and/or instant upload media folders. */ -@Suppress("TooManyFunctions") +@Suppress("TooManyFunctions", "LargeClass") class SyncedFoldersActivity : FileActivity(), SyncedFolderAdapter.ClickListener, diff --git a/app/src/main/java/com/owncloud/android/utils/WebViewUtil.kt b/app/src/main/java/com/owncloud/android/utils/WebViewUtil.kt index 550297e3df..26f66c8c49 100644 --- a/app/src/main/java/com/owncloud/android/utils/WebViewUtil.kt +++ b/app/src/main/java/com/owncloud/android/utils/WebViewUtil.kt @@ -123,7 +123,7 @@ class WebViewUtil(private val context: Context) { * @return */ @SuppressLint("PrivateApi", "DiscouragedPrivateApi") - @Suppress("TooGenericExceptionCaught") + @Suppress("TooGenericExceptionCaught", "NestedBlockDepth") fun setProxyKKPlus(webView: WebView) { val proxyHost = OwnCloudClientManagerFactory.getProxyHost() val proxyPort = OwnCloudClientManagerFactory.getProxyPort()