fix: 修正账号姓名展示与资料缓存
This commit is contained in:
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user