Skip to content

Commit ec1f5db

Browse files
committed
default value "fix"
1 parent 3b2a087 commit ec1f5db

File tree

2 files changed

+18
-13
lines changed
  • src/status_im

2 files changed

+18
-13
lines changed

src/status_im/common/standard_authentication/password_input/view.cljs

+12-8
Original file line numberDiff line numberDiff line change
@@ -49,23 +49,27 @@
4949
:suppress-highlighting true}
5050
(i18n/label :t/forgot-password)]]]))
5151

52-
(defn- on-change-password
53-
[entered-password]
54-
(debounce/debounce-and-dispatch [:profile/on-password-input-changed
55-
{:password (security/mask-data entered-password)
56-
:error ""}]
57-
100))
58-
5952
(defn view
6053
[{:keys [shell? on-press-biometrics blur?]}]
6154
(let [{:keys [error processing]} (rf/sub [:profile/login])
6255
error-message (rn/use-memo #(get-error-message error) [error])
63-
error? (boolean (seq error-message))]
56+
error? (boolean (seq error-message))
57+
default-value (rn/use-ref-atom "") ;;bug on Android
58+
;;https://github.com/status-im/status-mobile/issues/19004
59+
on-change-password (rn/use-callback
60+
(fn [entered-password]
61+
(reset! default-value entered-password)
62+
(debounce/debounce-and-dispatch [:profile/on-password-input-changed
63+
{:password (security/mask-data
64+
entered-password)
65+
:error ""}]
66+
100)))]
6467
[:<>
6568
[rn/view {:style {:flex-direction :row}}
6669
[quo/input
6770
{:container-style {:flex 1}
6871
:type :password
72+
:default-value @default-value
6973
:blur? blur?
7074
:disabled? processing
7175
:placeholder (i18n/label :t/type-your-password)

src/status_im/contexts/profile/profiles/view.cljs

+6-5
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,12 @@
186186

187187
(defn login-section
188188
[{:keys [show-profiles]}]
189-
(let [processing (rf/sub [:profile/login-processing])
190-
{:keys [key-uid name customization-color]} (rf/sub [:profile/login-profile])
191-
sign-in-enabled? (rf/sub [:sign-in-enabled?])
192-
profile-picture (rf/sub [:profile/login-profiles-picture key-uid])
193-
login-multiaccount #(rf/dispatch [:profile.login/login])]
189+
(let [processing (rf/sub [:profile/login-processing])
190+
{:keys [key-uid name
191+
customization-color]} (rf/sub [:profile/login-profile])
192+
sign-in-enabled? (rf/sub [:sign-in-enabled?])
193+
profile-picture (rf/sub [:profile/login-profiles-picture key-uid])
194+
login-multiaccount (rn/use-callback #(rf/dispatch [:profile.login/login]))]
194195
[rn/keyboard-avoiding-view
195196
{:style style/login-container
196197
:keyboardVerticalOffset (- (safe-area/get-bottom))}

0 commit comments

Comments
 (0)