feat: Implement optimistic UI for agent availability toggle, add email and phone visibility toggles, and improve the logout process with immediate socket disconnection and best-effort API calls.

This commit is contained in:
pradeepkumar committed 2026-03-15 00:35:39 +05:30
1 parent 54fdd66270
commit 21f669fca5
6 files changed
+104 -14

No files matched your search

@@ -433,6 +433,13 @@ class AgentDetailNotifier extends StateNotifier<AgentDetailState> {
return success;
}
void updateAvailability(bool isAvailable) {
if (state.agent == null) return;
state = state.copyWith(
agent: state.agent!.copyWith(isAvailable: isAvailable),
);
}
Future<bool> cancelConnection() async {
final requestId = state.connectionRequestId;
if (requestId == null) return false;