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)
movedToView
joinedAtView
if viewModel.isProAccount && viewModel.relationship?.following == false {
if viewModel.account?.isProAccount == true && viewModel.relationship?.following == false {
tipView
}
}

View file

@ -82,10 +82,6 @@ import SwiftUI
var followButtonViewModel: FollowButtonViewModel?
var isProAccount: Bool {
account?.url?.host() == "social-proxy.com"
}
private(set) var account: Account?
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"
}
public var isProAccount: Bool {
url?.host() == "social-proxy.com"
}
public var fullAccountName: String {
"\(acct)@\(url?.host() ?? "")"
}

View file

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