More progress

This commit is contained in:
Thomas Ricouard 2024-06-12 19:32:40 +02:00
parent dbc9c1f930
commit f1ffd66911
4 changed files with 6 additions and 6 deletions

View file

@ -219,7 +219,7 @@ struct AccountDetailHeaderView: View {
.accessibilityRespondsToUserInteraction(false) .accessibilityRespondsToUserInteraction(false)
movedToView movedToView
joinedAtView joinedAtView
if viewModel.isProAccount && viewModel.relationship?.following == false { if viewModel.account?.isProAccount == true && viewModel.relationship?.following == false {
tipView tipView
} }
} }

View file

@ -82,10 +82,6 @@ import SwiftUI
var followButtonViewModel: FollowButtonViewModel? var followButtonViewModel: FollowButtonViewModel?
var isProAccount: Bool {
account?.url?.host() == "social-proxy.com"
}
private(set) var account: Account? private(set) var account: Account?
private var tabTask: Task<Void, Never>? private var tabTask: Task<Void, Never>?

View file

@ -71,6 +71,10 @@ public final class Account: Codable, Identifiable, Hashable, Sendable, Equatable
header.lastPathComponent != "missing.png" header.lastPathComponent != "missing.png"
} }
public var isProAccount: Bool {
url?.host() == "social-proxy.com"
}
public var fullAccountName: String { public var fullAccountName: String {
"\(acct)@\(url?.host() ?? "")" "\(acct)@\(url?.host() ?? "")"
} }

View file

@ -109,7 +109,7 @@ import SwiftUI
theme.tintColor.opacity(0.15) theme.tintColor.opacity(0.15)
} else if userMentionned { } else if userMentionned {
theme.secondaryBackgroundColor theme.secondaryBackgroundColor
} else if TipedUsers.shared.usersIds.contains(finalStatus.account.id) { } else if status.account.isProAccount {
.yellow.opacity(0.4) .yellow.opacity(0.4)
} else { } else {
theme.primaryBackgroundColor theme.primaryBackgroundColor