mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-05-19 03:05:23 +00:00
ui: improve remote controller stop reason (#4670)
This commit is contained in:
@@ -2086,6 +2086,8 @@ func processReceivedMsg(_ res: ChatResponse) async {
|
||||
m.remoteCtrlSession = nil
|
||||
dismissAllSheets() {
|
||||
switch rcStopReason {
|
||||
case .disconnected:
|
||||
()
|
||||
case .connectionFailed(.errorAgent(.RCP(.identity))):
|
||||
AlertManager.shared.showAlertMsg(
|
||||
title: "Connection with desktop stopped",
|
||||
|
||||
+2
@@ -2523,6 +2523,8 @@ object ChatController {
|
||||
ModalManager.fullscreen.closeModals()
|
||||
fun showAlert(chatError: ChatError) {
|
||||
when {
|
||||
r.rcStopReason is RemoteCtrlStopReason.Disconnected ->
|
||||
{}
|
||||
r.rcStopReason is RemoteCtrlStopReason.ConnectionFailed
|
||||
&& r.rcStopReason.chatError is ChatError.ChatErrorAgent
|
||||
&& r.rcStopReason.chatError.agentError is AgentErrorType.RCP
|
||||
|
||||
Reference in New Issue
Block a user