Skip to content

Commit

Permalink
No longer shows the modal if the user manually updates their profile
Browse files Browse the repository at this point in the history
  • Loading branch information
ulisesmac committed Jan 24, 2025
1 parent 0e2bf00 commit cf5b9fc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
19 changes: 12 additions & 7 deletions src/status_im/contexts/profile/edit/modal/events.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,19 @@
(keyword :update-profile-asked key-uid))

(rf/reg-event-fx
:profile/ask-profile-update
(fn [{db :db} [pending-event]]
:profile/set-profile-update-as-asked
(fn [{db :db}]
(let [storage-key (-> db :profile/profile :key-uid profile-update-asked-storage-key)]
{:fx [[:effects.async-storage/set {storage-key true}]
[:dispatch
[:show-bottom-sheet
{:content (fn []
[introduce-yourself/sheet {:pending-event pending-event}])}]]]})))
{:fx [[:effects.async-storage/set {storage-key true}]]})))

(rf/reg-event-fx
:profile/ask-profile-update
(fn [_ [pending-event]]
{:fx [[:profile/set-profile-update-as-asked]
[:dispatch
[:show-bottom-sheet
{:content (fn []
[introduce-yourself/sheet {:pending-event pending-event}])}]]]}))

(rf/reg-event-fx
:profile/check-profile-update-prompt
Expand Down
3 changes: 2 additions & 1 deletion src/status_im/contexts/profile/edit/name/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
{:type :primary
:customization-color customization-color
:on-press (fn []
(rf/dispatch [:profile/edit-name {:display-name @full-name}]))
(rf/dispatch [:profile/edit-name {:display-name @full-name}])
(rf/dispatch [:profile/set-profile-update-as-asked]))
:disabled? (boolean (or @typing?
(string/blank? @full-name)
(not (string/blank? @error-msg))))}
Expand Down

0 comments on commit cf5b9fc

Please sign in to comment.