mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-29 06:52:50 +02:00
Fixes screen clean up in Login
This commit is contained in:
@@ -60,13 +60,27 @@ class LoginViewModel : ViewModel() {
|
||||
isFirstLogin: Boolean,
|
||||
newAccountKey: String?,
|
||||
) {
|
||||
clear()
|
||||
this.isFirstLogin = isFirstLogin
|
||||
acceptedTerms = isFirstLogin
|
||||
acceptedTerms = !isFirstLogin
|
||||
if (newAccountKey != null) {
|
||||
key = TextFieldValue(newAccountKey)
|
||||
}
|
||||
}
|
||||
|
||||
fun clear() {
|
||||
key = TextFieldValue("")
|
||||
password = TextFieldValue("")
|
||||
|
||||
errorManager.clearErrors()
|
||||
acceptedTerms = false
|
||||
processingLogin = false
|
||||
isTemporary = false
|
||||
offerTemporaryLogin = false
|
||||
torSettings = TorSettings()
|
||||
isFirstLogin = false
|
||||
}
|
||||
|
||||
fun updateKey(
|
||||
value: TextFieldValue,
|
||||
throughQR: Boolean,
|
||||
|
Reference in New Issue
Block a user