parent
b378d88aaf
commit
187d147dc7
|
@ -197,8 +197,6 @@
|
||||||
:params [key-uid (clean-path path) ax ay bx by]
|
:params [key-uid (clean-path path) ax ay bx by]
|
||||||
;; NOTE: In case of an error we can show a toast error
|
;; NOTE: In case of an error we can show a toast error
|
||||||
:on-success #(re-frame/dispatch [::update-local-picture %])}]}
|
:on-success #(re-frame/dispatch [::update-local-picture %])}]}
|
||||||
(multiaccounts.update/optimistic :images [{:url path
|
|
||||||
:type (name photo-quality-large)}])
|
|
||||||
(bottom-sheet/hide-bottom-sheet))))
|
(bottom-sheet/hide-bottom-sheet))))
|
||||||
|
|
||||||
(fx/defn save-profile-picture-from-url
|
(fx/defn save-profile-picture-from-url
|
||||||
|
|
|
@ -228,10 +228,10 @@
|
||||||
:<- [:contacts/contacts]
|
:<- [:contacts/contacts]
|
||||||
:<- [:profile/multiaccount]
|
:<- [:profile/multiaccount]
|
||||||
:<- [:mediaserver/port]
|
:<- [:mediaserver/port]
|
||||||
(fn [[contacts multiaccount port] [_ id]]
|
(fn [[contacts {:keys [public-key] :as multiaccount} port] [_ id]]
|
||||||
(let [contact (or (get contacts id)
|
(let [contact (or (when (= id public-key)
|
||||||
(when (= id (:public-key multiaccount))
|
multiaccount)
|
||||||
multiaccount))]
|
(get contacts id))]
|
||||||
(if (nil? contact)
|
(if (nil? contact)
|
||||||
(image-server/get-identicons-uri port id)
|
(image-server/get-identicons-uri port id)
|
||||||
(multiaccounts/displayed-photo contact)))))
|
(multiaccounts/displayed-photo contact)))))
|
||||||
|
|
|
@ -20,7 +20,8 @@
|
||||||
:on-load (fn [e]
|
:on-load (fn [e]
|
||||||
(when-let [on-load (:on-load props)]
|
(when-let [on-load (:on-load props)]
|
||||||
(on-load e))
|
(on-load e))
|
||||||
(reset! loaded? true))})
|
(reset! loaded? true)
|
||||||
|
(reset! error? false))})
|
||||||
(when (or @error? (not @loaded?))
|
(when (or @error? (not @loaded?))
|
||||||
[placeholder (:style props)
|
[placeholder (:style props)
|
||||||
(if @error?
|
(if @error?
|
||||||
|
|
Loading…
Reference in New Issue