mirror of
https://github.com/status-im/status-react.git
synced 2025-01-11 11:34:45 +00:00
Dont show wallet offline on desktop
This commit is contained in:
parent
d760f1696c
commit
7921729910
@ -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,22 +39,28 @@
|
|||||||
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]]
|
||||||
(when-let [label (cond
|
(let [wallet-offline? (and offline?
|
||||||
(and offline?
|
;; There's no wallet of desktop
|
||||||
disconnected?) :t/offline
|
(not utils.platform/desktop?))]
|
||||||
offline? :t/wallet-offline
|
|
||||||
disconnected? :t/disconnected
|
(when-let [label (cond
|
||||||
mailserver-connection-error? :t/mailserver-reconnect
|
(and wallet-offline?
|
||||||
mailserver-request-error? :t/mailserver-request-error-status
|
disconnected?) :t/offline
|
||||||
mailserver-fetching? :t/fetching-messages
|
|
||||||
:else nil)]
|
wallet-offline? :t/wallet-offline
|
||||||
(let [pending? (and (:pending current-chat-contact) (= :chat view-id))]
|
disconnected? :t/disconnected
|
||||||
[error-label
|
|
||||||
{:view-id view-id
|
mailserver-connection-error? :t/mailserver-reconnect
|
||||||
:top top
|
mailserver-request-error? :t/mailserver-request-error-status
|
||||||
:window-width window-width
|
mailserver-fetching? :t/fetching-messages
|
||||||
:pending? pending?
|
:else nil)]
|
||||||
:label label
|
(let [pending? (and (:pending current-chat-contact) (= :chat view-id))]
|
||||||
:mailserver-fetching? mailserver-fetching?
|
[error-label
|
||||||
:mailserver-request-error? mailserver-request-error?
|
{:view-id view-id
|
||||||
:mailserver-connection-error? mailserver-connection-error?}]))))
|
:top top
|
||||||
|
:window-width window-width
|
||||||
|
:pending? pending?
|
||||||
|
:label label
|
||||||
|
:mailserver-fetching? mailserver-fetching?
|
||||||
|
:mailserver-request-error? mailserver-request-error?
|
||||||
|
:mailserver-connection-error? mailserver-connection-error?}])))))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user