Skip to content

Commit

Permalink
[#18453] fix: display name changes effect profile image
Browse files Browse the repository at this point in the history
  • Loading branch information
mohsen-ghafouri committed Jan 30, 2024
1 parent af8d91b commit 002f96a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
12 changes: 7 additions & 5 deletions src/status_im/contexts/profile/edit/header/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
(defn view
[]
(let [profile (rf/sub [:profile/profile-with-image])
customization-color (rf/sub [:profile/customization-color])
full-name (profile.utils/displayed-name profile)
profile-picture (profile.utils/photo profile)
has-picture? (rf/sub [:profile/has-picture])
Expand All @@ -23,11 +24,12 @@
[quo/text-combinations {:title (i18n/label :t/edit-profile)}]
[rn/view style/avatar-wrapper
[quo/user-avatar
{:full-name full-name
:profile-picture profile-picture
:status-indicator? false
:ring? true
:size :big}]
{:full-name full-name
:profile-picture profile-picture
:customization-color customization-color
:status-indicator? false
:ring? true
:size :big}]
[quo/button
{:on-press (fn []
(rf/dispatch
Expand Down
4 changes: 2 additions & 2 deletions src/status_im/contexts/profile/edit/name/events.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
[{:keys [db]} [name]]
{:db (assoc-in db [:profile/profile :display-name] name)
:fx [[:json-rpc/call
[{:method "wakuext_setDisplayName"
:params [name]
[{:method "wakuext_updateDisplayName"
:params [{:displayName name}]
:on-success [:profile/edit-profile-name-success]}]]]})

(rf/reg-event-fx :profile/edit-name edit-profile-name)
4 changes: 2 additions & 2 deletions src/status_im/contexts/profile/edit/name/events_test.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
cofx {:db {:profile/profile {:display-name "Old name"}}}
expected {:db {:profile/profile {:display-name new-name}}
:fx [[:json-rpc/call
[{:method "wakuext_setDisplayName"
:params [name]
[{:method "wakuext_updateDisplayName"
:params [{:displayName name}]
:on-success [:profile/edit-profile-name-success]}]]]}]
(is (match? expected
(sut/edit-profile-name cofx [new-name])))))
6 changes: 3 additions & 3 deletions status-go-version.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
"owner": "status-im",
"repo": "status-go",
"version": "v0.172.8",
"commit-sha1": "436d22985661322ffda4eb44c1a160e6804f3823",
"src-sha256": "1y3l469k2085qaml7dmaky1rlanl4phq2p6yyk97074yw839jzj1"
"version": "feat/update-display-name",
"commit-sha1": "5c4b8964b955c442ad2adca9cdbe73cb9544dded",
"src-sha256": "0khlv89qbskqj8ysp06snji16l42319g050pp8w7l6fspfaijxad"
}

0 comments on commit 002f96a

Please sign in to comment.