mirror of
https://github.com/status-im/status-react.git
synced 2025-01-12 20:14:40 +00:00
Co-authored-by: Alexander <alwxndr@gmail.com>
This commit is contained in:
parent
22a606cbab
commit
394648b377
@ -5,9 +5,11 @@
|
|||||||
[utils.re-frame :as rf]))
|
[utils.re-frame :as rf]))
|
||||||
|
|
||||||
(rf/reg-event-fx :profile/update-local-picture
|
(rf/reg-event-fx :profile/update-local-picture
|
||||||
(fn [{:keys [db]} [images]]
|
(fn [{:keys [db now]} [images]]
|
||||||
{:db (if images
|
{:db (if images
|
||||||
(assoc-in db [:profile/profile :images] images)
|
(assoc-in db
|
||||||
|
[:profile/profile :images]
|
||||||
|
(map #(assoc % :clock now) images))
|
||||||
(update db :profile/profile dissoc :images))}))
|
(update db :profile/profile dissoc :images))}))
|
||||||
|
|
||||||
(rf/reg-event-fx :profile/edit-profile-picture-success
|
(rf/reg-event-fx :profile/edit-profile-picture-success
|
||||||
|
@ -129,8 +129,10 @@
|
|||||||
[:dispatch [:hide-bottom-sheet]]]})))
|
[:dispatch [:hide-bottom-sheet]]]})))
|
||||||
|
|
||||||
(rf/reg-event-fx :profile.settings/update-local-picture
|
(rf/reg-event-fx :profile.settings/update-local-picture
|
||||||
(fn [{:keys [db]} [images]]
|
(fn [{:keys [db now]} [images]]
|
||||||
{:db (assoc-in db [:profile/profile :images] images)}))
|
{:db (assoc-in db
|
||||||
|
[:profile/profile :images]
|
||||||
|
(map #(assoc % :clock now) images))}))
|
||||||
|
|
||||||
(rf/reg-event-fx :profile.settings/mnemonic-was-shown
|
(rf/reg-event-fx :profile.settings/mnemonic-was-shown
|
||||||
(fn [_]
|
(fn [_]
|
||||||
|
@ -65,6 +65,7 @@
|
|||||||
(fn [[profiles port font-file theme] [_ target-key-uid]]
|
(fn [[profiles port font-file theme] [_ target-key-uid]]
|
||||||
(let [{:keys [images ens-name? customization-color] :as profile} (get profiles target-key-uid)
|
(let [{:keys [images ens-name? customization-color] :as profile} (get profiles target-key-uid)
|
||||||
image-name (-> images first :type)
|
image-name (-> images first :type)
|
||||||
|
image-clock (-> images first :clock)
|
||||||
override-ring? (when ens-name? false)]
|
override-ring? (when ens-name? false)]
|
||||||
(when (and profile port)
|
(when (and profile port)
|
||||||
{:config
|
{:config
|
||||||
@ -75,6 +76,7 @@
|
|||||||
:image-name image-name
|
:image-name image-name
|
||||||
:key-uid target-key-uid
|
:key-uid target-key-uid
|
||||||
:theme theme
|
:theme theme
|
||||||
|
:clock image-clock
|
||||||
:override-ring? override-ring?}}
|
:override-ring? override-ring?}}
|
||||||
{:type :initials
|
{:type :initials
|
||||||
:options {:port port
|
:options {:port port
|
||||||
@ -236,7 +238,10 @@
|
|||||||
customization-color]} profile
|
customization-color]} profile
|
||||||
ens-name? (or ens-name? (seq ens-names))
|
ens-name? (or ens-name? (seq ens-names))
|
||||||
avatar-opts (assoc avatar-opts :override-ring? (when ens-name? false))
|
avatar-opts (assoc avatar-opts :override-ring? (when ens-name? false))
|
||||||
images-with-uri (mapv (fn [{key-uid :keyUid image-name :type :as image}]
|
images-with-uri (mapv (fn [{key-uid :keyUid
|
||||||
|
image-name :type
|
||||||
|
image-clock :clock
|
||||||
|
:as image}]
|
||||||
(assoc image
|
(assoc image
|
||||||
:config
|
:config
|
||||||
{:type :account
|
{:type :account
|
||||||
@ -244,6 +249,7 @@
|
|||||||
{:port port
|
{:port port
|
||||||
:ratio pixel-ratio/ratio
|
:ratio pixel-ratio/ratio
|
||||||
:image-name image-name
|
:image-name image-name
|
||||||
|
:clock image-clock
|
||||||
:key-uid key-uid
|
:key-uid key-uid
|
||||||
:theme theme}
|
:theme theme}
|
||||||
avatar-opts)}))
|
avatar-opts)}))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user