mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2024-12-17 17:20:21 +01:00
fix loading chat, contact connection status info (#277)
This commit is contained in:
committed by
GitHub
parent
7883ca7657
commit
eeea33c7cb
@@ -237,9 +237,19 @@ final class Chat: ObservableObject, Identifiable {
|
||||
var statusString: String {
|
||||
get {
|
||||
switch self {
|
||||
case .connected: return "Connected to contact's server"
|
||||
case let .error(err): return "Connecting to contact's server… (error: \(err))"
|
||||
default: return "Connecting to contact's server…"
|
||||
case .connected: return "Server connected"
|
||||
case let .error(err): return "Connecting server… (error: \(err))"
|
||||
default: return "Connecting server…"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var statusExplanation: String {
|
||||
get {
|
||||
switch self {
|
||||
case .connected: return "You are connected to the server you use to receve messages from this contact."
|
||||
case let .error(err): return "Trying to connect to the server you use to receve messages from this contact (error: \(err))."
|
||||
default: return "Trying to connect to the server you use to receve messages from this contact."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,7 +187,6 @@ enum TerminalItem: Identifiable {
|
||||
|
||||
func chatSendCmd(_ cmd: ChatCommand) throws -> ChatResponse {
|
||||
var c = cmd.cmdString.cString(using: .utf8)!
|
||||
print("command", cmd.cmdString)
|
||||
// TODO some mechanism to update model without passing it - maybe Publisher / Subscriber?
|
||||
// DispatchQueue.main.async {
|
||||
// termId += 1
|
||||
|
||||
Reference in New Issue
Block a user