@@ -123,6 +123,7 @@ fun ChatScreen(
123 val sessionDeleted by vm.sessionDeleted.collectAsStateWithLifecycle()
123 val sessionDeleted by vm.sessionDeleted.collectAsStateWithLifecycle()
124 val failedDraft by vm.failedDraft.collectAsStateWithLifecycle()
124 val failedDraft by vm.failedDraft.collectAsStateWithLifecycle()
125 val draft by vm.draft.collectAsStateWithLifecycle()
125 val draft by vm.draft.collectAsStateWithLifecycle()
126+ val reconnecting by vm.reconnecting.collectAsStateWithLifecycle()
126 val haptics = LocalHapticFeedback.current
127 val haptics = LocalHapticFeedback.current
127 val scope = rememberCoroutineScope()
128 val scope = rememberCoroutineScope()
128 val shareContext = LocalContext.current
129 val shareContext = LocalContext.current
@@ -309,8 +310,16 @@ fun ChatScreen(
309 color = MaterialTheme.colorScheme.error,
310 color = MaterialTheme.colorScheme.error,
311 Spacer(Modifier.size(12.dp))
312 Spacer(Modifier.size(12.dp))
312− Button(onClick = { vm.reconnect() }) {
313+ Button(onClick = { vm.reconnect() }, enabled = !reconnecting) {
315+ CircularProgressIndicator(
316+ Modifier.size(20.dp),
317+ color = MaterialTheme.colorScheme.onPrimary,
313− Text(stringResource(R.string.reconnect))
321+ Text(stringResource(R.string.reconnect))