Fix code analytics

Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
alperozturk 2024-02-29 15:46:32 +01:00 committed by Alper Öztürk
parent 6b7fc48230
commit 202d177128
6 changed files with 13 additions and 8 deletions

View file

@ -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)

View file

@ -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,

View file

@ -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 {
}
}
}

View file

@ -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,

View file

@ -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,

View file

@ -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()