Dont show wallet offline on desktop

This commit is contained in:
Andrea Maria Piana 2018-12-10 15:19:31 +01:00
parent d760f1696c
commit 7921729910
No known key found for this signature in database
GPG Key ID: AA6CCA6DE0E06424

View File

@ -4,6 +4,7 @@
[reagent.core :as reagent] [reagent.core :as reagent]
[status-im.ui.components.react :as react] [status-im.ui.components.react :as react]
[status-im.ui.components.connectivity.styles :as styles] [status-im.ui.components.connectivity.styles :as styles]
[status-im.utils.platform :as utils.platform]
[status-im.i18n :as i18n])) [status-im.i18n :as i18n]))
(defview error-label (defview error-label
@ -38,11 +39,17 @@
current-chat-contact [:chats/current-chat-contact] current-chat-contact [:chats/current-chat-contact]
view-id [:get :view-id] view-id [:get :view-id]
window-width [:dimensions/window-width]] window-width [:dimensions/window-width]]
(let [wallet-offline? (and offline?
;; There's no wallet of desktop
(not utils.platform/desktop?))]
(when-let [label (cond (when-let [label (cond
(and offline? (and wallet-offline?
disconnected?) :t/offline disconnected?) :t/offline
offline? :t/wallet-offline
wallet-offline? :t/wallet-offline
disconnected? :t/disconnected disconnected? :t/disconnected
mailserver-connection-error? :t/mailserver-reconnect mailserver-connection-error? :t/mailserver-reconnect
mailserver-request-error? :t/mailserver-request-error-status mailserver-request-error? :t/mailserver-request-error-status
mailserver-fetching? :t/fetching-messages mailserver-fetching? :t/fetching-messages
@ -56,4 +63,4 @@
:label label :label label
:mailserver-fetching? mailserver-fetching? :mailserver-fetching? mailserver-fetching?
:mailserver-request-error? mailserver-request-error? :mailserver-request-error? mailserver-request-error?
:mailserver-connection-error? mailserver-connection-error?}])))) :mailserver-connection-error? mailserver-connection-error?}])))))