mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-02-18 18:55:14 +00:00
Improved stretchy account header (#518)
This commit is contained in:
parent
aff0c943f8
commit
d9546d92d9
2 changed files with 7 additions and 3 deletions
|
@ -25,7 +25,11 @@ struct AccountDetailHeaderView: View {
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack(alignment: .leading) {
|
VStack(alignment: .leading) {
|
||||||
|
Rectangle()
|
||||||
|
.frame(height: 200)
|
||||||
|
.overlay {
|
||||||
headerImageView
|
headerImageView
|
||||||
|
}
|
||||||
accountInfoView
|
accountInfoView
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -347,7 +347,7 @@ public struct AccountDetailView: View {
|
||||||
@ToolbarContentBuilder
|
@ToolbarContentBuilder
|
||||||
private var toolbarContent: some ToolbarContent {
|
private var toolbarContent: some ToolbarContent {
|
||||||
ToolbarItem(placement: .principal) {
|
ToolbarItem(placement: .principal) {
|
||||||
if scrollOffset < -200 {
|
if scrollOffset < -170 {
|
||||||
switch viewModel.accountState {
|
switch viewModel.accountState {
|
||||||
case let .data(account):
|
case let .data(account):
|
||||||
EmojiTextApp(.init(stringValue: account.safeDisplayName), emojis: account.emojis)
|
EmojiTextApp(.init(stringValue: account.safeDisplayName), emojis: account.emojis)
|
||||||
|
@ -531,7 +531,7 @@ public struct AccountDetailView: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} label: {
|
} label: {
|
||||||
if scrollOffset < -40 {
|
if scrollOffset < -5 {
|
||||||
Image(systemName: "ellipsis.circle")
|
Image(systemName: "ellipsis.circle")
|
||||||
} else {
|
} else {
|
||||||
Image(systemName: "ellipsis.circle.fill")
|
Image(systemName: "ellipsis.circle.fill")
|
||||||
|
|
Loading…
Reference in a new issue