mirror of
https://github.com/status-im/status-react.git
synced 2025-02-26 17:41:03 +00:00
Add re-send popup to desktop
This commit is contained in:
parent
82f9b58b97
commit
090b4a1282
@ -207,6 +207,7 @@
|
||||
|
||||
(fx/defn handle-connection-status-change
|
||||
[{:keys [db] :as cofx} is-connected?]
|
||||
(println "ChANGED" is-connected?)
|
||||
(fx/merge cofx
|
||||
{:db (assoc db :network-status (if is-connected? :online :offline))}
|
||||
(mailserver/network-connection-status-changed is-connected?)))
|
||||
|
@ -26,3 +26,8 @@
|
||||
chat-id])}]
|
||||
(remove nil?)))
|
||||
|
||||
(defn get-message-menu-items [chat-id message-id]
|
||||
[{:text (i18n/label :t/resend-message)
|
||||
:on-select #(re-frame/dispatch [:chat.ui/resend-message chat-id message-id])}
|
||||
{:text (i18n/label :t/delete-message)
|
||||
:on-select #(re-frame/dispatch [:chat.ui/delete-message chat-id message-id])}])
|
||||
|
@ -9,6 +9,7 @@
|
||||
[status-im.chat.commands.receiving :as commands-receiving]
|
||||
[status-im.ui.screens.chat.styles.message.message :as style]
|
||||
[status-im.ui.screens.chat.photos :as photos]
|
||||
[status-im.ui.components.popup-menu.views :as desktop.pop-up]
|
||||
[status-im.constants :as constants]
|
||||
[status-im.ui.screens.chat.utils :as chat.utils]
|
||||
[status-im.utils.identicon :as identicon]
|
||||
@ -180,24 +181,29 @@
|
||||
[react/activity-indicator {:animating true}]])
|
||||
|
||||
(defn message-not-sent-text [chat-id message-id]
|
||||
[react/touchable-highlight {:on-press (fn [] (if platform/ios?
|
||||
[react/touchable-highlight {:on-press (fn [] (cond
|
||||
platform/ios?
|
||||
(action-sheet/show {:title (i18n/label :message-not-sent)
|
||||
:options [{:label (i18n/label :resend-message)
|
||||
:action #(re-frame/dispatch [:chat.ui/resend-message chat-id message-id])}
|
||||
{:label (i18n/label :delete-message)
|
||||
:destructive? true
|
||||
:action #(re-frame/dispatch [:chat.ui/delete-message chat-id message-id])}]})
|
||||
platform/desktop?
|
||||
(desktop.pop-up/show-desktop-menu
|
||||
(desktop.pop-up/get-message-menu-items chat-id message-id))
|
||||
|
||||
:else
|
||||
(re-frame/dispatch
|
||||
[:chat.ui/show-message-options {:chat-id chat-id
|
||||
:message-id message-id}])))}
|
||||
[react/view style/not-sent-view
|
||||
[react/text {:style style/not-sent-text}
|
||||
(i18n/message-status-label (if platform/desktop?
|
||||
:not-sent-without-tap
|
||||
:not-sent))]
|
||||
(when-not platform/desktop?
|
||||
[react/view style/not-sent-icon
|
||||
[vector-icons/icon :icons/warning {:color colors/red}]])]])
|
||||
:not-sent-click
|
||||
:not-sent-tap))]
|
||||
[react/view style/not-sent-icon
|
||||
[vector-icons/icon :icons/warning {:color colors/red}]]]])
|
||||
|
||||
(defview command-status [{{:keys [network]} :params}]
|
||||
(letsubs [current-network [:network-name]]
|
||||
|
@ -252,8 +252,8 @@
|
||||
"start-chat": "Start chat",
|
||||
"wallet-onboarding-title": "Simple and secure cryptocurrency wallet",
|
||||
"logout": "Log out",
|
||||
"status-not-sent": "Not confirmed. Tap for options",
|
||||
"status-not-sent-without-tap": "Not confirmed",
|
||||
"status-not-sent-tap": "Not confirmed. Tap for options",
|
||||
"status-not-sent-click": "Not confirmed. Click for options",
|
||||
"edit-network-config": "Edit network config",
|
||||
"clear-history-confirmation": "Clear history?",
|
||||
"connect": "Connect",
|
||||
|
Loading…
x
Reference in New Issue
Block a user