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 com.owncloud.android.utils.DisplayUtils
import kotlinx.coroutines.delay import kotlinx.coroutines.delay
@Suppress("LongMethod")
@OptIn(ExperimentalMaterial3Api::class) @OptIn(ExperimentalMaterial3Api::class)
@Composable @Composable
fun AssistantScreen(viewModel: AssistantViewModel) { fun AssistantScreen(viewModel: AssistantViewModel) {
@ -81,6 +82,7 @@ fun AssistantScreen(viewModel: AssistantViewModel) {
} }
val pullRefreshState = rememberPullToRefreshState() val pullRefreshState = rememberPullToRefreshState()
@Suppress("MagicNumber")
if (pullRefreshState.isRefreshing) { if (pullRefreshState.isRefreshing) {
LaunchedEffect(true) { LaunchedEffect(true) {
delay(1500) delay(1500)

View file

@ -52,6 +52,7 @@ import com.owncloud.android.lib.resources.assistant.model.Task
@OptIn(ExperimentalFoundationApi::class) @OptIn(ExperimentalFoundationApi::class)
@SuppressLint("ResourceAsColor") @SuppressLint("ResourceAsColor")
@Suppress("LongMethod", "MagicNumber")
@Composable @Composable
fun TaskView( fun TaskView(
task: Task, task: Task,

View file

@ -100,13 +100,14 @@ class ComposeActivity : DrawerActivity() {
nextcloudClient = getNextcloudClient(user, context) nextcloudClient = getNextcloudClient(user, context)
} }
return if (destination == ComposeDestination.AssistantScreen && nextcloudClient != null) { if (destination == ComposeDestination.AssistantScreen) {
nextcloudClient?.let {
AssistantScreen( AssistantScreen(
viewModel = AssistantViewModel( viewModel = AssistantViewModel(
client = nextcloudClient!! client = it
) )
) )
} else { }
} }
} }

View file

@ -36,6 +36,7 @@ import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import com.owncloud.android.R import com.owncloud.android.R
@Suppress("LongParameterList")
@Composable @Composable
fun SimpleAlertDialog( fun SimpleAlertDialog(
backgroundColor: Color, backgroundColor: Color,

View file

@ -80,7 +80,7 @@ import javax.inject.Inject
/** /**
* Activity displaying all auto-synced folders and/or instant upload media folders. * Activity displaying all auto-synced folders and/or instant upload media folders.
*/ */
@Suppress("TooManyFunctions") @Suppress("TooManyFunctions", "LargeClass")
class SyncedFoldersActivity : class SyncedFoldersActivity :
FileActivity(), FileActivity(),
SyncedFolderAdapter.ClickListener, SyncedFolderAdapter.ClickListener,

View file

@ -123,7 +123,7 @@ class WebViewUtil(private val context: Context) {
* @return * @return
*/ */
@SuppressLint("PrivateApi", "DiscouragedPrivateApi") @SuppressLint("PrivateApi", "DiscouragedPrivateApi")
@Suppress("TooGenericExceptionCaught") @Suppress("TooGenericExceptionCaught", "NestedBlockDepth")
fun setProxyKKPlus(webView: WebView) { fun setProxyKKPlus(webView: WebView) {
val proxyHost = OwnCloudClientManagerFactory.getProxyHost() val proxyHost = OwnCloudClientManagerFactory.getProxyHost()
val proxyPort = OwnCloudClientManagerFactory.getProxyPort() val proxyPort = OwnCloudClientManagerFactory.getProxyPort()