mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-10-01 21:39:16 +00:00
Update Call.hs revert call status change
minimization
This commit is contained in:
@@ -180,21 +180,19 @@ data WebRTCExtraInfo = WebRTCExtraInfo
|
||||
}
|
||||
deriving (Eq, Show)
|
||||
|
||||
data WebRTCCallStatus = WCSConnecting | WCSConnected | WCSReconnecting | WCSDisconnected | WCSFailed
|
||||
data WebRTCCallStatus = WCSConnecting | WCSConnected | WCSDisconnected | WCSFailed
|
||||
deriving (Show)
|
||||
|
||||
instance StrEncoding WebRTCCallStatus where
|
||||
strEncode = \case
|
||||
WCSConnecting -> "connecting"
|
||||
WCSConnected -> "connected"
|
||||
WCSReconnecting -> "reconnecting"
|
||||
WCSDisconnected -> "disconnected"
|
||||
WCSFailed -> "failed"
|
||||
strP =
|
||||
A.takeTill (== ' ') >>= \case
|
||||
"connecting" -> pure WCSConnecting
|
||||
"connected" -> pure WCSConnected
|
||||
"reconnecting" -> pure WCSReconnecting
|
||||
"disconnected" -> pure WCSDisconnected
|
||||
"failed" -> pure WCSFailed
|
||||
_ -> fail "bad WebRTCCallStatus"
|
||||
|
||||
Reference in New Issue
Block a user