初始化名字

This commit is contained in:
renhaoting 2026-01-12 18:16:58 +08:00
parent 36e999a439
commit 4d56fe2515
1 changed files with 7 additions and 1 deletions

View File

@ -75,7 +75,13 @@ class MineFragment : AppViewsFragment<ViewBinding, UiState, ViewModel>(),
nameEditRoot.isVisible = false
nameNormalRoot.isVisible = true
tvAccountName.text = AccountManager.getAccount().userName
var name = AccountManager.getAccount().userName
if (name.isEmpty()) {
name = "Miguel"
AccountManager.updateUserName(name)
}
tvAccountName.text = name
etAccountName.addTextChangedListener(object : TextWatcher {
override fun afterTextChanged(s: Editable?) {