diff --git a/src/status_im/multiaccounts/core.cljs b/src/status_im/multiaccounts/core.cljs index bd202155d7..6483e9330d 100644 --- a/src/status_im/multiaccounts/core.cljs +++ b/src/status_im/multiaccounts/core.cljs @@ -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 diff --git a/src/status_im/subs/chat/chats.cljs b/src/status_im/subs/chat/chats.cljs index 4634609311..729e6467e7 100644 --- a/src/status_im/subs/chat/chats.cljs +++ b/src/status_im/subs/chat/chats.cljs @@ -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))))) diff --git a/src/status_im/ui/components/fast_image.cljs b/src/status_im/ui/components/fast_image.cljs index 1dda2d92a6..2b879f83b4 100644 --- a/src/status_im/ui/components/fast_image.cljs +++ b/src/status_im/ui/components/fast_image.cljs @@ -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?