[#12918] Show history gaps only in public chats and communities
This commit is contained in:
parent
de3c08ba18
commit
29a7e4dc1c
|
@ -12,12 +12,13 @@
|
||||||
(re-frame/dispatch [:chat.ui/fill-gaps chat-id gap-ids])))
|
(re-frame/dispatch [:chat.ui/fill-gaps chat-id gap-ids])))
|
||||||
|
|
||||||
(views/defview gap
|
(views/defview gap
|
||||||
[{:keys [gap-ids chat-id gap-parameters]}]
|
[{:keys [gap-ids chat-id gap-parameters public? community?]}]
|
||||||
(views/letsubs [in-progress? [:chats/fetching-gap-in-progress?
|
(views/letsubs [in-progress? [:chats/fetching-gap-in-progress?
|
||||||
gap-ids
|
gap-ids
|
||||||
chat-id]
|
chat-id]
|
||||||
connected? [:mailserver/connected?]
|
connected? [:mailserver/connected?]
|
||||||
first-gap? (= gap-ids #{:first-gap})]
|
first-gap? (= gap-ids #{:first-gap})]
|
||||||
|
(when (or (not first-gap?) public? community?)
|
||||||
[react/view {:style (style/gap-container)}
|
[react/view {:style (style/gap-container)}
|
||||||
[react/touchable-highlight
|
[react/touchable-highlight
|
||||||
{:on-press (when (and connected? (not in-progress?))
|
{:on-press (when (and connected? (not in-progress?))
|
||||||
|
@ -36,4 +37,4 @@
|
||||||
(str
|
(str
|
||||||
"\n"
|
"\n"
|
||||||
(i18n/label :t/load-messages-before
|
(i18n/label :t/load-messages-before
|
||||||
{:date date})))])])]]]))
|
{:date date})))])])]]])))
|
||||||
|
|
|
@ -243,7 +243,8 @@
|
||||||
(defn render-fn [{:keys [outgoing type] :as message}
|
(defn render-fn [{:keys [outgoing type] :as message}
|
||||||
idx
|
idx
|
||||||
_
|
_
|
||||||
{:keys [group-chat public? current-public-key space-keeper chat-id show-input? message-pin-enabled edit-enabled in-pinned-view?]}]
|
{:keys [group-chat public? community? current-public-key space-keeper
|
||||||
|
chat-id show-input? message-pin-enabled edit-enabled in-pinned-view?]}]
|
||||||
[react/view {:style (when (and platform/android? (not in-pinned-view?)) {:scaleY -1})}
|
[react/view {:style (when (and platform/android? (not in-pinned-view?)) {:scaleY -1})}
|
||||||
(if (= type :datemark)
|
(if (= type :datemark)
|
||||||
[message-datemark/chat-datemark (:value message)]
|
[message-datemark/chat-datemark (:value message)]
|
||||||
|
@ -255,6 +256,7 @@
|
||||||
:incoming-group (and group-chat (not outgoing))
|
:incoming-group (and group-chat (not outgoing))
|
||||||
:group-chat group-chat
|
:group-chat group-chat
|
||||||
:public? public?
|
:public? public?
|
||||||
|
:community? community?
|
||||||
:current-public-key current-public-key
|
:current-public-key current-public-key
|
||||||
:show-input? show-input?
|
:show-input? show-input?
|
||||||
:message-pin-enabled message-pin-enabled
|
:message-pin-enabled message-pin-enabled
|
||||||
|
@ -285,6 +287,7 @@
|
||||||
community-admin?))))]
|
community-admin?))))]
|
||||||
{:group-chat group-chat
|
{:group-chat group-chat
|
||||||
:public? public?
|
:public? public?
|
||||||
|
:community? (not (nil? community-id))
|
||||||
:current-public-key current-public-key
|
:current-public-key current-public-key
|
||||||
:space-keeper space-keeper
|
:space-keeper space-keeper
|
||||||
:chat-id chat-id
|
:chat-id chat-id
|
||||||
|
|
Loading…
Reference in New Issue