Improved stretchy account header (#518)

This commit is contained in:
Matthias Buchetics 2023-01-30 07:13:38 +01:00 committed by GitHub
parent aff0c943f8
commit d9546d92d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -25,7 +25,11 @@ struct AccountDetailHeaderView: View {
var body: some View {
VStack(alignment: .leading) {
headerImageView
Rectangle()
.frame(height: 200)
.overlay {
headerImageView
}
accountInfoView
}
}

View File

@ -347,7 +347,7 @@ public struct AccountDetailView: View {
@ToolbarContentBuilder
private var toolbarContent: some ToolbarContent {
ToolbarItem(placement: .principal) {
if scrollOffset < -200 {
if scrollOffset < -170 {
switch viewModel.accountState {
case let .data(account):
EmojiTextApp(.init(stringValue: account.safeDisplayName), emojis: account.emojis)
@ -531,7 +531,7 @@ public struct AccountDetailView: View {
}
}
} label: {
if scrollOffset < -40 {
if scrollOffset < -5 {
Image(systemName: "ellipsis.circle")
} else {
Image(systemName: "ellipsis.circle.fill")