Skip to content

Commit 0800906

Browse files
committed
fix: Remove Guest login and fix real Mandi data fallback
1 parent ab93db7 commit 0800906

3 files changed

Lines changed: 7 additions & 16 deletions

File tree

app/src/main/java/com/example/LoginScreen.kt

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -327,20 +327,7 @@ fun LoginScreen(
327327
}
328328
}
329329

330-
Spacer(Modifier.height(14.dp))
331330

332-
// Continue as Guest Button
333-
TextButton(
334-
onClick = { viewModel.continueAsGuest() },
335-
modifier = Modifier.fillMaxWidth()
336-
) {
337-
Text(
338-
"Skip for now · Continue as Guest",
339-
color = Color(0x99FFFFFF),
340-
fontWeight = FontWeight.Medium,
341-
fontSize = 14.sp
342-
)
343-
}
344331
}
345332
}
346333

app/src/main/java/com/example/MandiApiService.kt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,13 @@ object MandiApiService {
133133
commodity: String
134134
): Result<List<MandiRecord>> = withContext(Dispatchers.IO) {
135135
// 1. Query Real Data from Supabase Database
136-
val supabaseRecords = SupabaseApi.fetchMandiRates(state, commodity)
137-
if (supabaseRecords.isNotEmpty()) {
138-
return@withContext Result.success(supabaseRecords)
136+
try {
137+
val supabaseRecords = SupabaseApi.fetchMandiRates(state, commodity)
138+
if (supabaseRecords.isNotEmpty()) {
139+
return@withContext Result.success(supabaseRecords)
140+
}
141+
} catch (e: Exception) {
142+
// Silently fallback to gov api if supabase fails
139143
}
140144

141145
// 2. Query Direct Agmarknet Government API (Real-Time)

web/public/NuKropAI_v1.0.apk

-634 KB
Binary file not shown.

0 commit comments

Comments
 (0)