mirror of
https://github.com/status-im/status-mobile.git
synced 2025-02-26 15:21:08 +00:00
fix profile picture on login screen (#15985)
This commit is contained in:
parent
0890b1b1b5
commit
cb19a31a5f
@ -38,18 +38,22 @@
|
|||||||
uses `ring-background` to display the ring behind the initials when given. Otherwise,
|
uses `ring-background` to display the ring behind the initials when given. Otherwise,
|
||||||
shows the `profile-picture` which already comes with the ring drawn."
|
shows the `profile-picture` which already comes with the ring drawn."
|
||||||
[{:keys [full-name status-indicator? online? size profile-picture ring-background
|
[{:keys [full-name status-indicator? online? size profile-picture ring-background
|
||||||
customization-color]
|
customization-color static?]
|
||||||
:or {status-indicator? true
|
:or {status-indicator? true
|
||||||
online? true
|
online? true
|
||||||
size :big
|
size :big
|
||||||
customization-color :turquoise}}]
|
customization-color :turquoise}}]
|
||||||
(let [full-name (or full-name "empty name")
|
(let [full-name (or full-name "empty name")
|
||||||
draw-ring? (and ring-background (valid-ring-sizes size))
|
draw-ring? (and ring-background (valid-ring-sizes size))
|
||||||
outer-styles (style/outer size)]
|
outer-styles (style/outer size)
|
||||||
|
;; Once image is loaded, fast image rerenders view with the help of reagent atom,
|
||||||
|
;; But dynamic updates don't work when user-avatar is used inside hole-view
|
||||||
|
;; https://github.com/status-im/status-mobile/issues/15553
|
||||||
|
image-view (if static? rn/image fast-image/fast-image)]
|
||||||
[rn/view {:style outer-styles :accessibility-label :user-avatar}
|
[rn/view {:style outer-styles :accessibility-label :user-avatar}
|
||||||
;; The `profile-picture` already has the ring in it
|
;; The `profile-picture` already has the ring in it
|
||||||
(when-let [image (or profile-picture ring-background)]
|
(when-let [image (or profile-picture ring-background)]
|
||||||
[fast-image/fast-image
|
[image-view
|
||||||
{:accessibility-label (if draw-ring? :ring-background :profile-picture)
|
{:accessibility-label (if draw-ring? :ring-background :profile-picture)
|
||||||
:style outer-styles
|
:style outer-styles
|
||||||
:source image}])
|
:source image}])
|
||||||
|
@ -57,7 +57,8 @@
|
|||||||
:override-theme :dark
|
:override-theme :dark
|
||||||
:size :medium
|
:size :medium
|
||||||
:status-indicator? false
|
:status-indicator? false
|
||||||
:customization-color customization-color}]
|
:customization-color customization-color
|
||||||
|
:static? true}]
|
||||||
[rn/view {:flex-direction :row}
|
[rn/view {:flex-direction :row}
|
||||||
(when show-logged-in?
|
(when show-logged-in?
|
||||||
[tag/tag
|
[tag/tag
|
||||||
|
Loading…
x
Reference in New Issue
Block a user