mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-26 18:21:00 +00:00
Merge pull request #7 from angristan/account-navbar-title-emoji
AccountDetailView: support display name with emoji in navbar title
This commit is contained in:
commit
193469fbc0
2 changed files with 8 additions and 3 deletions
|
@ -92,7 +92,14 @@ public struct AccountDetailView: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.edgesIgnoringSafeArea(.top)
|
.edgesIgnoringSafeArea(.top)
|
||||||
.navigationTitle(Text(scrollOffset < -200 ? viewModel.title : ""))
|
.navigationBarTitleDisplayMode(.inline)
|
||||||
|
.toolbar {
|
||||||
|
ToolbarItem(placement: .principal) {
|
||||||
|
if scrollOffset < -200 {
|
||||||
|
currentAccount.account?.displayNameWithEmojis
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ViewBuilder
|
@ViewBuilder
|
||||||
|
|
|
@ -46,7 +46,6 @@ class AccountDetailViewModel: ObservableObject, StatusesFetcher {
|
||||||
}
|
}
|
||||||
@Published var statusesState: StatusesState = .loading
|
@Published var statusesState: StatusesState = .loading
|
||||||
|
|
||||||
@Published var title: String = ""
|
|
||||||
@Published var relationship: Relationshionship?
|
@Published var relationship: Relationshionship?
|
||||||
@Published var favourites: [Status] = []
|
@Published var favourites: [Status] = []
|
||||||
private var favouritesNextPage: LinkHandler?
|
private var favouritesNextPage: LinkHandler?
|
||||||
|
@ -89,7 +88,6 @@ class AccountDetailViewModel: ObservableObject, StatusesFetcher {
|
||||||
self.featuredTags = try await featuredTags
|
self.featuredTags = try await featuredTags
|
||||||
self.featuredTags.sort { $0.statusesCountInt > $1.statusesCountInt }
|
self.featuredTags.sort { $0.statusesCountInt > $1.statusesCountInt }
|
||||||
self.fields = loadedAccount.fields
|
self.fields = loadedAccount.fields
|
||||||
self.title = loadedAccount.displayName
|
|
||||||
if isCurrentUser {
|
if isCurrentUser {
|
||||||
self.followedTags = try await followedTags
|
self.followedTags = try await followedTags
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue