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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user