fix settings blinking and warnings

Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
This commit is contained in:
Andrey Shovkoplyas 2020-06-12 11:51:01 +02:00
parent ee2dec5b27
commit 880424c07b
No known key found for this signature in database
GPG Key ID: EAAB7C8622D860A4
2 changed files with 27 additions and 30 deletions

View File

@ -44,7 +44,7 @@
offset (reagent/atom 0)
on-layout (fn [evt]
(reset! offset (oget evt "nativeEvent" "layout" "height")))]
(fn [{:keys [extended-header] :as props} & children]
(fn [{:keys [extended-header] :as props} children]
[animated/view {:flex 1
:pointer-events :box-none}
[animated/code {:key (str @offset)

View File

@ -181,34 +181,31 @@
active-contacts-count @(re-frame/subscribe [:contacts/active-count])
tribute-to-talk @(re-frame/subscribe [:tribute-to-talk/profile])
registrar @(re-frame/subscribe [:ens.stateofus/registrar])]
(flat-list-content
preferred-name registrar tribute-to-talk
active-contacts-count mnemonic
keycard-pairing notifications-enabled?)))
[react/view
(for [item (flat-list-content
preferred-name registrar tribute-to-talk
active-contacts-count mnemonic
keycard-pairing notifications-enabled?)]
^{:key (str "item" (:title item))}
[list.views/flat-list-generic-render-fn item])]))
(defn my-profile []
(fn []
(let [{:keys [public-key ens-verified preferred-name]
:as account} @(re-frame/subscribe [:multiaccount])
on-share #(re-frame/dispatch [:show-popover
{:view :share-chat-key
:address public-key
:ens-name preferred-name}])]
[react/view {:style {:flex 1}}
[quo/animated-header
{:right-accessories [{:icon :main-icons/share
:on-press on-share}]
:use-insets true
:extended-header (profile-header/extended-header
{:on-press on-share
:title (multiaccounts/displayed-name account)
:photo (multiaccounts/displayed-photo account)
:subtitle (if (and ens-verified public-key)
(gfy/generate-gfy public-key)
public-key)})}
[list.views/flat-list
{:data (content)
:initial-num-to-render 3
:render-fn list.views/flat-list-generic-render-fn
:key-fn (fn [_ idx] (str idx))
:keyboard-should-persist-taps :handled}]]])))
(let [{:keys [public-key ens-verified preferred-name]
:as account} @(re-frame/subscribe [:multiaccount])
on-share #(re-frame/dispatch [:show-popover
{:view :share-chat-key
:address public-key
:ens-name preferred-name}])]
[react/view {:style {:flex 1}}
[quo/animated-header
{:right-accessories [{:icon :main-icons/share
:on-press on-share}]
:use-insets true
:extended-header (profile-header/extended-header
{:on-press on-share
:title (multiaccounts/displayed-name account)
:photo (multiaccounts/displayed-photo account)
:subtitle (if (and ens-verified public-key)
(gfy/generate-gfy public-key)
public-key)})}
[content]]]))