From 4339cf83fdb0daea83f389e1a85cd0b3f73728b8 Mon Sep 17 00:00:00 2001 From: Lumaa Date: Fri, 26 Jan 2024 14:52:11 +0100 Subject: [PATCH] Added custom emoji selector button --- Threaded/Views/PostingView.swift | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Threaded/Views/PostingView.swift b/Threaded/Views/PostingView.swift index 00dc726..be20844 100644 --- a/Threaded/Views/PostingView.swift +++ b/Threaded/Views/PostingView.swift @@ -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() + } } }