fix: 修正账号姓名展示与资料缓存

This commit is contained in:
2026-07-31 15:19:22 +08:00
parent f863004c8d
commit 0cf0a41a60
10 changed files with 102 additions and 37 deletions

View File

@ -38,6 +38,11 @@ final class ProfileViewController: BaseViewController {
title = "我的"
}
override func viewDidLoad() {
super.viewDidLoad()
applyViewModel()
}
override func setupUI() {
view.backgroundColor = UIColor(hex: 0xF7FAFF)
@ -104,12 +109,10 @@ final class ProfileViewController: BaseViewController {
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
let showLoading = !hasLoadedProfileOnce
let showLoading = !hasLoadedProfileOnce && !viewModel.hasCachedBasicInfo
Task {
await reloadProfile(showGlobalLoading: showLoading)
if showLoading {
hasLoadedProfileOnce = true
}
hasLoadedProfileOnce = true
}
}