mirror of
https://github.com/status-im/status-mobile.git
synced 2025-02-05 13:25:43 +00:00
[#13233] Proper message after clearing history in pubchat
This commit is contained in:
parent
78864c099f
commit
346574a494
@ -92,13 +92,14 @@
|
|||||||
|
|
||||||
(defn calculate-quiet-time [synced-to
|
(defn calculate-quiet-time [synced-to
|
||||||
synced-from]
|
synced-from]
|
||||||
(let [quiet-hours (quot (- synced-to synced-from)
|
(when synced-from
|
||||||
(* 60 60))]
|
(let [quiet-hours (quot (- synced-to synced-from)
|
||||||
(if (<= quiet-hours 24)
|
(* 60 60))]
|
||||||
(i18n/label :t/quiet-hours
|
(if (<= quiet-hours 24)
|
||||||
{:quiet-hours quiet-hours})
|
(i18n/label :t/quiet-hours
|
||||||
(i18n/label :t/quiet-days
|
{:quiet-hours quiet-hours})
|
||||||
{:quiet-days (quot quiet-hours 24)}))))
|
(i18n/label :t/quiet-days
|
||||||
|
{:quiet-days (quot quiet-hours 24)})))))
|
||||||
|
|
||||||
(defview no-messages-community-chat-description-container [chat-id]
|
(defview no-messages-community-chat-description-container [chat-id]
|
||||||
(letsubs [{:keys [synced-to synced-from]}
|
(letsubs [{:keys [synced-to synced-from]}
|
||||||
@ -113,18 +114,20 @@
|
|||||||
(defview no-messages-private-group-chat-description-container [chat-id]
|
(defview no-messages-private-group-chat-description-container [chat-id]
|
||||||
(letsubs [{:keys [synced-to synced-from]}
|
(letsubs [{:keys [synced-to synced-from]}
|
||||||
[:chats/synced-to-and-from chat-id]]
|
[:chats/synced-to-and-from chat-id]]
|
||||||
[react/nested-text {:style (merge style/intro-header-description
|
(let [quiet-time (calculate-quiet-time synced-to
|
||||||
{:margin-bottom 36})}
|
synced-from)]
|
||||||
(let [quiet-time (calculate-quiet-time synced-to
|
[react/nested-text {:style (merge style/intro-header-description
|
||||||
synced-from)]
|
{:margin-bottom 36})}
|
||||||
(i18n/label :t/empty-chat-description-public
|
(if quiet-time
|
||||||
{:quiet-hours quiet-time}))
|
(i18n/label :t/empty-chat-description-public
|
||||||
[{:style {:color colors/blue}
|
{:quiet-hours quiet-time})
|
||||||
:on-press #(list-selection/open-share
|
(i18n/label :t/cleared-chat-description-public))
|
||||||
{:message
|
[{:style {:color colors/blue}
|
||||||
(i18n/label
|
:on-press #(list-selection/open-share
|
||||||
:t/share-public-chat-text {:link (links/generate-link :public-chat :external chat-id)})})}
|
{:message
|
||||||
(i18n/label :t/empty-chat-description-public-share-this)]]))
|
(i18n/label
|
||||||
|
:t/share-public-chat-text {:link (links/generate-link :public-chat :external chat-id)})})}
|
||||||
|
(i18n/label :t/empty-chat-description-public-share-this)]])))
|
||||||
|
|
||||||
(defview pending-invitation-description
|
(defview pending-invitation-description
|
||||||
[inviter-pk chat-name]
|
[inviter-pk chat-name]
|
||||||
|
@ -449,6 +449,7 @@
|
|||||||
"empty-chat-description": "There are no messages \nin this chat yet",
|
"empty-chat-description": "There are no messages \nin this chat yet",
|
||||||
"empty-chat-description-one-to-one": "Any messages you send here are encrypted and can only be read by you and ",
|
"empty-chat-description-one-to-one": "Any messages you send here are encrypted and can only be read by you and ",
|
||||||
"empty-chat-description-public": "It's been quiet here for the last {{quiet-hours}}. Start the conversation or ",
|
"empty-chat-description-public": "It's been quiet here for the last {{quiet-hours}}. Start the conversation or ",
|
||||||
|
"cleared-chat-description-public": "It's been quiet here. Start the conversation or ",
|
||||||
"empty-chat-description-community": "It's been quiet here for the last {{quiet-hours}}.",
|
"empty-chat-description-community": "It's been quiet here for the last {{quiet-hours}}.",
|
||||||
"empty-chat-description-public-share-this": "share this chat.",
|
"empty-chat-description-public-share-this": "share this chat.",
|
||||||
"enable": "Enable",
|
"enable": "Enable",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user