mirror of
https://github.com/nextcloud/android.git
synced 2024-11-25 22:55:46 +03:00
Fix code analytics
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
parent
6b7fc48230
commit
202d177128
6 changed files with 13 additions and 8 deletions
|
@ -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)
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -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) {
|
||||||
AssistantScreen(
|
nextcloudClient?.let {
|
||||||
viewModel = AssistantViewModel(
|
AssistantScreen(
|
||||||
client = nextcloudClient!!
|
viewModel = AssistantViewModel(
|
||||||
|
client = it
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
}
|
||||||
} else {
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -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()
|
||||||
|
|
Loading…
Reference in a new issue