@@ -123,6 +123,7 @@ fun ChatScreen(
123123 val sessionDeleted by vm.sessionDeleted.collectAsStateWithLifecycle()
124124 val failedDraft by vm.failedDraft.collectAsStateWithLifecycle()
125125 val draft by vm.draft.collectAsStateWithLifecycle()
126+ val reconnecting by vm.reconnecting.collectAsStateWithLifecycle()
126127 val haptics = LocalHapticFeedback.current
127128 val scope = rememberCoroutineScope()
128129 val shareContext = LocalContext.current
@@ -309,8 +310,16 @@ fun ChatScreen(
309310 color = MaterialTheme.colorScheme.error,
310311 )
311312 Spacer(Modifier.size(12.dp))
312− Button(onClick = { vm.reconnect() }) {
313− Text(stringResource(R.string.reconnect))
313+ Button(onClick = { vm.reconnect() }, enabled = !reconnecting) {
314+ if (reconnecting) {
315+ CircularProgressIndicator(
316+ Modifier.size(20.dp),
317+ color = MaterialTheme.colorScheme.onPrimary,
318+ strokeWidth = 2.dp,
319+ )
320+ } else {
321+ Text(stringResource(R.string.reconnect))
322+ }
314323 }
315324 }
316325 } else {