Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix scrolling issue on emoji picker #2032

Merged
merged 2 commits into from
Apr 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ extension StatusEditor {
@MainActor
struct CustomEmojisView: View {
@Environment(\.dismiss) private var dismiss

@Environment(Theme.self) private var theme

var viewModel: ViewModel

var body: some View {
NavigationStack {
ScrollView {
ForEach(viewModel.customEmojiContainer) { container in
LazyVGrid(columns: [GridItem(.adaptive(minimum: 40, maximum: 40))], spacing: 9) {
LazyVGrid(columns: [GridItem(.adaptive(minimum: 40, maximum: 40))], spacing: 9) {
ForEach(viewModel.customEmojiContainer) { container in
Section {
ForEach(container.emojis) { emoji in
LazyImage(url: emoji.url) { state in
Expand All @@ -39,15 +39,16 @@ extension StatusEditor {
viewModel.insertStatusText(text: " :\(emoji.shortcode): ")
}
}
.padding(.horizontal, 16)
} header: {
HStack {
Text(container.categoryName)
.font(.scaledFootnote)
Spacer()
}
Text(container.categoryName)
.font(.scaledHeadline)
.bold()
.foregroundStyle(Color.secondary)
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.horizontal, 16)
}
}
.padding(.horizontal, 8)
}
}
.toolbar {
Expand Down
Loading