Browse Source

Improve error message

chat
Aditya Kulkarni 5 years ago
parent
commit
01ec41c980
  1. 9
      app/src/main/java/com/adityapk/zcash/zqwandroid/ConnectionManager.kt

9
app/src/main/java/com/adityapk/zcash/zqwandroid/ConnectionManager.kt

@ -172,7 +172,14 @@ object ConnectionManager {
// If the connection is direct, and there is no need to further connect, so just error out
if (t is ConnectException && (m_directConn && !allowInternet)) {
sendErrorSignal(t.localizedMessage, true)
var mesg = t.localizedMessage
if (!DataModel.getAllowInternet()) {
mesg += ": Connecting over the internet was not enabled by the desktop node."
} else if (!DataModel.getGlobalAllowInternet()) {
mesg += ": Connecting over the internet is disabled in settings."
}
sendErrorSignal(mesg, true)
sendRefreshSignal(true)
return
}

Loading…
Cancel
Save