fix: use acct instead of username in profile header view

This commit is contained in:
CMK 2022-06-05 16:41:47 +08:00
parent 229d75b76a
commit b91b3fa23d
2 changed files with 4 additions and 4 deletions

View File

@ -33,7 +33,7 @@ extension ProfileHeaderView {
.assign(to: \.name, on: viewModel)
.store(in: &disposeBag)
// username
viewModel.username = user.username
viewModel.acct = user.acctWithDomain
// bio
user.publisher(for: \.note)
.assign(to: \.note, on: viewModel)

View File

@ -33,7 +33,7 @@ extension ProfileHeaderView {
@Published var name: String?
@Published var nameEditing: String?
@Published var username: String?
@Published var acct: String?
@Published var note: String?
@Published var noteEditing: String?
@ -133,8 +133,8 @@ extension ProfileHeaderView.ViewModel {
}
.store(in: &disposeBag)
// username
$username
.map { username in username.flatMap { "@" + $0 } ?? " " }
$acct
.map { acct in acct.flatMap { "@" + $0 } ?? " " }
.assign(to: \.text, on: view.usernameLabel)
.store(in: &disposeBag)
// bio