You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is the following: the new value of state is exactly the same as the previous one (as we are reselecting the same country). MutableStateFlow does not emit a new value to its collectors if we set the same value.
That's why the following line is not called:
Code
Layout:
Activity:
Reproduction steps
Result
The text field is empty
Expected behavior
The text field contains area code of the selected country.
Possible cause:
After country is selected, the text field is cleared:
PhoneNumberKit/lib/src/main/java/me/ibrahimsn/lib/PhoneNumberKit.kt
Line 214 in d152d0e
Then, the value of
state
is updated with the correct country code:PhoneNumberKit/lib/src/main/java/me/ibrahimsn/lib/PhoneNumberKit.kt
Line 111 in d152d0e
The problem is the following: the new value of
state
is exactly the same as the previous one (as we are reselecting the same country).MutableStateFlow
does not emit a new value to its collectors if we set the same value.That's why the following line is not called:
PhoneNumberKit/lib/src/main/java/me/ibrahimsn/lib/PhoneNumberKit.kt
Line 163 in d152d0e
And the text field stays empty.
The text was updated successfully, but these errors were encountered: