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