File tree 2 files changed +18
-13
lines changed
common/standard_authentication/password_input
contexts/profile/profiles
2 files changed +18
-13
lines changed Original file line number Diff line number Diff line change 49
49
:suppress-highlighting true }
50
50
(i18n/label :t/forgot-password )]]]))
51
51
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
-
59
52
(defn view
60
53
[{:keys [shell? on-press-biometrics blur?]}]
61
54
(let [{:keys [error processing]} (rf/sub [:profile/login ])
62
55
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 )))]
64
67
[:<>
65
68
[rn/view {:style {:flex-direction :row }}
66
69
[quo/input
67
70
{:container-style {:flex 1 }
68
71
:type :password
72
+ :default-value @default-value
69
73
:blur? blur?
70
74
:disabled? processing
71
75
:placeholder (i18n/label :t/type-your-password )
Original file line number Diff line number Diff line change 186
186
187
187
(defn login-section
188
188
[{: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 ]))]
194
195
[rn/keyboard-avoiding-view
195
196
{:style style/login-container
196
197
:keyboardVerticalOffset (- (safe-area/get-bottom ))}
You can’t perform that action at this time.
0 commit comments