Added custom emoji selector button

This commit is contained in:
Lumaa 2024-01-26 14:52:11 +01:00
parent 5e38c06b50
commit 4339cf83fd
1 changed files with 11 additions and 0 deletions

View File

@ -17,12 +17,19 @@ struct PostingView: View {
@State private var visibility: Visibility = .pub
@State private var selectedPhotos: PhotosPickerItem?
@State private var selectingEmoji: Bool = false
@State private var postingStatus: Bool = false
var body: some View {
if accountManager.getAccount() != nil {
posting
.sheet(isPresented: $selectingEmoji) {
Text(String("Custom Emoji selection"))
.presentationDetents([.medium])
.presentationDragIndicator(.visible)
.presentationBackgroundInteraction(.enabled) // Allow users to move the cursor while adding emojis
}
} else {
loading
}
@ -161,6 +168,10 @@ struct PostingView: View {
viewModel.append(text: "#")
}
}
actionButton("face.smiling") {
selectingEmoji.toggle()
}
}
}