Fixes
This commit is contained in:
parent
03d719edaf
commit
4e7bdd4742
|
@ -214,9 +214,9 @@
|
||||||
subtitle])]]])
|
subtitle])]]])
|
||||||
|
|
||||||
(defn actions-list-view []
|
(defn actions-list-view []
|
||||||
(let [{:keys [group-chat active]}
|
(let [{:keys [group-chat chat-id]}
|
||||||
(subscribe [:chat-properties [:group-chat :name :contacts :active]])]
|
(subscribe [:chat-properties [:group-chat :chat-id]])]
|
||||||
(when-let [actions (when (and @group-chat @active)
|
(when-let [actions (if @group-chat
|
||||||
[{:title "Add Contact to chat"
|
[{:title "Add Contact to chat"
|
||||||
:icon :icon_menu_group
|
:icon :icon_menu_group
|
||||||
:icon-style {:width 25
|
:icon-style {:width 25
|
||||||
|
@ -241,12 +241,12 @@
|
||||||
:icon :icon_settings
|
:icon :icon_settings
|
||||||
:icon-style {:width 20
|
:icon-style {:width 20
|
||||||
:height 13}
|
:height 13}
|
||||||
:handler (fn [])}]
|
:handler (fn [])}]
|
||||||
[{:title "Profile"
|
[{:title "Profile"
|
||||||
:icon "icon_menu_group"
|
:icon "icon_menu_group"
|
||||||
:icon-style {:width 25
|
:icon-style {:width 25
|
||||||
:height 19}
|
:height 19}
|
||||||
:handler #(dispatch [:show-profile navigator (:chat-id chat)])}])]
|
:handler #(dispatch [:show-profile @chat-id])}])]
|
||||||
[view {:style {:backgroundColor toolbar-background1
|
[view {:style {:backgroundColor toolbar-background1
|
||||||
:elevation 2
|
:elevation 2
|
||||||
:position :absolute
|
:position :absolute
|
||||||
|
|
|
@ -34,9 +34,9 @@
|
||||||
(let [message-atom (subscribe [:get-chat-command-content])]
|
(let [message-atom (subscribe [:get-chat-command-content])]
|
||||||
(fn [command input-options & {:keys [validator]}]
|
(fn [command input-options & {:keys [validator]}]
|
||||||
(let [message @message-atom]
|
(let [message @message-atom]
|
||||||
[view {:style {:flexDirection "column"}}
|
[view {:style {:flexDirection :column}}
|
||||||
[content-suggestions-view]
|
[content-suggestions-view]
|
||||||
[view {:style {:flexDirection "row"
|
[view {:style {:flexDirection :row
|
||||||
:height 56
|
:height 56
|
||||||
:backgroundColor color-white
|
:backgroundColor color-white
|
||||||
:elevation 4}}
|
:elevation 4}}
|
||||||
|
@ -65,11 +65,13 @@
|
||||||
:placeholder "Type"
|
:placeholder "Type"
|
||||||
:placeholderTextColor text2-color
|
:placeholderTextColor text2-color
|
||||||
:onChangeText set-input-message
|
:onChangeText set-input-message
|
||||||
:onSubmitEditing send-command}
|
:onSubmitEditing (fn []
|
||||||
input-options)
|
(when (valid? message validator)
|
||||||
message]
|
(send-command)))}
|
||||||
(if (valid? message validator)
|
input-options)
|
||||||
[touchable-highlight
|
message]
|
||||||
|
(if (valid? message validator)
|
||||||
|
[touchable-highlight
|
||||||
{:on-press send-command
|
{:on-press send-command
|
||||||
:underlay-color :transparent}
|
:underlay-color :transparent}
|
||||||
[view {:style {:marginTop 10
|
[view {:style {:marginTop 10
|
||||||
|
|
|
@ -451,10 +451,10 @@
|
||||||
(contacts/load-syng-contacts db)))
|
(contacts/load-syng-contacts db)))
|
||||||
|
|
||||||
(register-handler :show-profile
|
(register-handler :show-profile
|
||||||
(fn [db [action navigator identity]]
|
(fn [db [action identity]]
|
||||||
(log/debug action)
|
(log/debug action)
|
||||||
(let [db (contacts/set-contact-identity db identity)]
|
(let [db (contacts/set-contact-identity db identity)]
|
||||||
(dispatch [:navigate-to navigator {:view-id :profile} :push])
|
(dispatch [:navigate-to :profile])
|
||||||
db)))
|
db)))
|
||||||
|
|
||||||
;; -- Chats --------------------------------------------------------------
|
;; -- Chats --------------------------------------------------------------
|
||||||
|
@ -465,7 +465,8 @@
|
||||||
(let [db (-> db
|
(let [db (-> db
|
||||||
(create-chat chat-id [chat-id] false)
|
(create-chat chat-id [chat-id] false)
|
||||||
(set-current-chat-id chat-id))]
|
(set-current-chat-id chat-id))]
|
||||||
(dispatch [:navigate-to navigator {:view-id :chat} nav-type])
|
;; (dispatch [:navigate-to navigator {:view-id :chat} nav-type])
|
||||||
|
(dispatch [:navigate-to :chat])
|
||||||
db)))
|
db)))
|
||||||
|
|
||||||
(register-handler :init-console-chat
|
(register-handler :init-console-chat
|
||||||
|
|
Loading…
Reference in New Issue