mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-10-10 01:42:32 +02:00
Fixes screen clean up in Login
This commit is contained in:
@@ -60,13 +60,27 @@ class LoginViewModel : ViewModel() {
|
|||||||
isFirstLogin: Boolean,
|
isFirstLogin: Boolean,
|
||||||
newAccountKey: String?,
|
newAccountKey: String?,
|
||||||
) {
|
) {
|
||||||
|
clear()
|
||||||
this.isFirstLogin = isFirstLogin
|
this.isFirstLogin = isFirstLogin
|
||||||
acceptedTerms = isFirstLogin
|
acceptedTerms = !isFirstLogin
|
||||||
if (newAccountKey != null) {
|
if (newAccountKey != null) {
|
||||||
key = TextFieldValue(newAccountKey)
|
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(
|
fun updateKey(
|
||||||
value: TextFieldValue,
|
value: TextFieldValue,
|
||||||
throughQR: Boolean,
|
throughQR: Boolean,
|
||||||
|
Reference in New Issue
Block a user