Skip to content

Commit

Permalink
fix code static analysis
Browse files Browse the repository at this point in the history
Signed-off-by: alperozturk <alper_ozturk@proton.me>
  • Loading branch information
alperozturk96 committed Oct 2, 2024
1 parent 1897034 commit 5056428
Showing 1 changed file with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,14 @@ fun AssistantScreen(viewModel: AssistantViewModel, activity: Activity) {
val pullRefreshState = rememberPullToRefreshState()

@Suppress("MagicNumber")
Box(modifier = Modifier.pullToRefresh(isRefreshing, pullRefreshState, onRefresh = {
scope.launch {
delay(1500)
viewModel.fetchTaskList()
}
})) {
Box(
modifier = Modifier.pullToRefresh(isRefreshing, pullRefreshState, onRefresh = {
scope.launch {
delay(1500)
viewModel.fetchTaskList()
}
})
) {
if (state == AssistantViewModel.State.Loading || isRefreshing) {
CenterText(text = stringResource(id = R.string.assistant_screen_loading))
} else {
Expand All @@ -101,7 +103,10 @@ fun AssistantScreen(viewModel: AssistantViewModel, activity: Activity) {
if (isRefreshing) {
LinearProgressIndicator(modifier = Modifier.fillMaxWidth())
} else {
LinearProgressIndicator(progress = { pullRefreshState.distanceFraction }, modifier = Modifier.fillMaxWidth())
LinearProgressIndicator(
progress = { pullRefreshState.distanceFraction },
modifier = Modifier.fillMaxWidth()
)
}

if (selectedTaskType?.name != stringResource(id = R.string.assistant_screen_all_task_type)) {
Expand Down

0 comments on commit 5056428

Please sign in to comment.