refactor(settings): edit settings tab (#496)

* refactor(settings): remove current connection editor fields

Remove the active host, port, token fields, and clear token button from the main Connection tab, as profiles are now managed exclusively through the ProfileEditorDialog.

* feat(settings): migrate to full auto-save design and remove save button

Update settings change listeners (auto-reconnect, typing effect delay/toggle) to save state immediately to AuthManager. Remove the manual Save button from the scaffold's top bar and delete the redundant SaveIndicator.

* style(settings): clean up unused imports from settings UI cleanup

* fix(chat): resolve compose resource lint error and initial state test failure

Pre-resolve empty credentials string resource at the composable scope to fix LocalContext resource query lint error. Update testInitialStateAndConnection to use DISCONNECTED state to trigger connection and pass verification.
This commit is contained in:
M57 authored and GitHub committed 2026-07-08 02:07:11 +03:00
1 parent 04bb7c4325
commit 21092c79f2
5 files changed
+185 -167

No files matched your search

@@ -1667,7 +1667,7 @@ private fun ReloginDialog(
onDismiss: () -> Unit,
onRelogin: (String, String, (Boolean, String?) -> Unit) -> Unit,
) {
val context = LocalContext.current
val emptyCredentialsError = stringResource(R.string.chat_relogin_error_empty)
val statusColors = LocalHermesStatusColors.current
var username by rememberSaveable { mutableStateOf("") }
var password by rememberSaveable { mutableStateOf("") }
@@ -1721,7 +1721,7 @@ private fun ReloginDialog(
enabled = !isLoading,
onClick = {
if (username.isBlank() || password.isBlank()) {
errorMessage = context.getString(R.string.chat_relogin_error_empty)
errorMessage = emptyCredentialsError
return@TextButton
}
isLoading = true