Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

fix(ensu): keep advanced settings limited to prompt and model

Prateek Sunale6aa489fce8d
diff --git a/mobile/native/android/apps/ensu/app-ui/src/main/java/io/ente/ensu/HomeNavigation.kt b/mobile/native/android/apps/ensu/app-ui/src/main/java/io/ente/ensu/HomeNavigation.kt
index 368be6540f..36f1590ad5 100644
--- a/mobile/native/android/apps/ensu/app-ui/src/main/java/io/ente/ensu/HomeNavigation.kt
+++ b/mobile/native/android/apps/ensu/app-ui/src/main/java/io/ente/ensu/HomeNavigation.kt
@@ -152,9 +152,7 @@ internal fun HomeNavigation(
popEnterTransition = { backEnter() },
popExitTransition = { backExit() }
) {
- val currentEndpoint by currentEndpointFlow.collectAsState(initial = "https://api.ente.io")
SettingsScreen(
- currentEndpoint = currentEndpoint,
buildVersion = appVersion,
isLoggedIn = appState.auth.isLoggedIn,
userEmail = appState.auth.email,
@@ -162,7 +160,6 @@ internal fun HomeNavigation(
onOpenLogs = { navController.navigate(HomeRoute.Logs) },
onOpenModelSettings = { navController.navigate(HomeRoute.ModelSettings) },
onOpenSystemPromptSettings = { navController.navigate(HomeRoute.SystemPromptSettings) },
- onOpenEndpointSettings = { navController.navigate(HomeRoute.EndpointSettings) },
onUnlockAdvanced = {
store.unlockAdvancedSettings()
advancedSettingsDataStore.persistUnlockAdvancedSettings()
diff --git a/mobile/native/android/apps/ensu/app-ui/src/main/java/io/ente/ensu/settings/SettingsScreen.kt b/mobile/native/android/apps/ensu/app-ui/src/main/java/io/ente/ensu/settings/SettingsScreen.kt
index 34a52e0e07..f446957063 100644
--- a/mobile/native/android/apps/ensu/app-ui/src/main/java/io/ente/ensu/settings/SettingsScreen.kt
+++ b/mobile/native/android/apps/ensu/app-ui/src/main/java/io/ente/ensu/settings/SettingsScreen.kt
@@ -45,7 +45,6 @@ import io.ente.ensu.designsystem.HugeIcons
@Composable
fun SettingsScreen(
- currentEndpoint: String,
buildVersion: String,
isLoggedIn: Boolean,
userEmail: String?,
@@ -53,7 +52,6 @@ fun SettingsScreen(
onOpenLogs: () -> Unit,
onOpenModelSettings: () -> Unit,
onOpenSystemPromptSettings: () -> Unit,
- onOpenEndpointSettings: () -> Unit,
onUnlockAdvanced: () -> Unit,
onSignOut: () -> Unit,
onSignIn: () -> Unit,
@@ -190,10 +188,6 @@ fun SettingsScreen(
Spacer(modifier = Modifier.size(EnsuSpacing.md.dp))
}
- val normalizedEndpoint = currentEndpoint.trim().trimEnd('/')
- val defaultEndpoint = "https://api.ente.io"
- val isCustomEndpoint = query.isBlank() && normalizedEndpoint.isNotBlank() && normalizedEndpoint != defaultEndpoint
-
LazyColumn(verticalArrangement = Arrangement.spacedBy(EnsuSpacing.sm.dp)) {
items(filteredItems, key = { it.title }) { item ->
SettingsRow(item)
@@ -227,30 +221,6 @@ fun SettingsScreen(
)
)
}
- item(key = "advanced-endpoint") {
- SettingsRow(
- SettingsItem(
- title = "Endpoint",
- iconRes = HugeIcons.Settings01Icon,
- onClick = onOpenEndpointSettings
- )
- )
- }
- }
-
- if (isCustomEndpoint) {
- item(key = "endpoint") {
- Spacer(modifier = Modifier.size(EnsuSpacing.sm.dp))
- Text(
- text = "Endpoint: $normalizedEndpoint",
- style = EnsuTypography.small,
- color = EnsuColor.textMuted(),
- textAlign = TextAlign.Center,
- modifier = Modifier
- .fillMaxWidth()
- .padding(vertical = EnsuSpacing.sm.dp)
- )
- }
}
if (query.isBlank()) {