This commit is contained in:
Trey t
2025-11-06 17:53:41 -06:00
parent e24d1d8559
commit 66fe773398
16 changed files with 214 additions and 201 deletions

View File

@@ -66,7 +66,7 @@ fun AllTasksScreen(
}
) { paddingValues ->
when (tasksState) {
is ApiResult.Loading -> {
is ApiResult.Idle, is ApiResult.Loading -> {
Box(
modifier = Modifier
.fillMaxSize()

View File

@@ -111,7 +111,7 @@ fun HomeScreen(
}
}
}
is ApiResult.Loading -> {
is ApiResult.Idle, is ApiResult.Loading -> {
Card(modifier = Modifier.fillMaxWidth()) {
Box(
modifier = Modifier

View File

@@ -1,14 +1,11 @@
package com.mycrib.android.ui.screens
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.*
import androidx.compose.material3.*
import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.shadow
import androidx.compose.ui.unit.dp
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
@@ -32,22 +29,10 @@ fun MainScreen(
Scaffold(
bottomBar = {
Box(
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 16.dp, vertical = 12.dp),
contentAlignment = Alignment.Center
NavigationBar(
containerColor = MaterialTheme.colorScheme.surfaceContainer,
tonalElevation = 3.dp
) {
NavigationBar(
modifier = Modifier
.widthIn(max = 500.dp)
.shadow(
elevation = 4.dp,
shape = RoundedCornerShape(20.dp)
),
containerColor = MaterialTheme.colorScheme.surfaceContainerHigh,
tonalElevation = 0.dp
) {
NavigationBarItem(
icon = { Icon(Icons.Default.Home, contentDescription = "Residences") },
label = { Text("Residences") },
@@ -102,7 +87,6 @@ fun MainScreen(
unselectedTextColor = MaterialTheme.colorScheme.onSurfaceVariant
)
)
}
}
}
) { paddingValues ->

View File

@@ -77,6 +77,9 @@ fun ProfileScreen(
errorMessage = ""
successMessage = ""
}
is ApiResult.Idle -> {
// Do nothing - initial state, no loading indicator needed
}
else -> {}
}
}

View File

@@ -172,7 +172,7 @@ fun ResidenceDetailScreen(
}
) { paddingValues ->
when (residenceState) {
is ApiResult.Loading -> {
is ApiResult.Idle, is ApiResult.Loading -> {
Box(
modifier = Modifier
.fillMaxSize()
@@ -364,7 +364,7 @@ fun ResidenceDetailScreen(
}
when (tasksState) {
is ApiResult.Loading -> {
is ApiResult.Idle, is ApiResult.Loading -> {
item {
Box(
modifier = Modifier

View File

@@ -67,7 +67,7 @@ fun ResidencesScreen(
}
) { paddingValues ->
when (myResidencesState) {
is ApiResult.Loading -> {
is ApiResult.Idle, is ApiResult.Loading -> {
Box(
modifier = Modifier
.fillMaxSize()

View File

@@ -65,7 +65,7 @@ fun TasksScreen(
}
) { paddingValues ->
when (tasksState) {
is ApiResult.Loading -> {
is ApiResult.Idle, is ApiResult.Loading -> {
Box(
modifier = Modifier
.fillMaxSize()

View File

@@ -44,7 +44,7 @@ fun VerifyEmailScreen(
errorMessage = (verifyState as ApiResult.Error).message
isLoading = false
}
is ApiResult.Loading -> {
is ApiResult.Idle, is ApiResult.Loading -> {
isLoading = true
errorMessage = ""
}