mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2024-12-17 17:20:21 +01:00
worst emoji picker ever
This commit is contained in:
@@ -681,8 +681,16 @@ struct CreateChatListTag: View {
|
||||
var body: some View {
|
||||
List {
|
||||
HStack {
|
||||
Button {
|
||||
emoji = "🚀"
|
||||
Menu {
|
||||
let emojis = allEmojis()
|
||||
ForEach(emojis, id: \.self) { emj in
|
||||
Button(action: {
|
||||
emoji = emj
|
||||
}) {
|
||||
Text(emj)
|
||||
.font(.largeTitle)
|
||||
}
|
||||
}
|
||||
} label: {
|
||||
if emoji.isEmpty {
|
||||
Image(systemName: "face.smiling")
|
||||
@@ -736,6 +744,16 @@ struct CreateChatListTag: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func allEmojis() -> [String] {
|
||||
var emojis: [String] = []
|
||||
for scalar in (0x1F300...0x1FAFF) {
|
||||
if let unicodeScalar = UnicodeScalar(scalar), unicodeScalar.properties.isEmoji {
|
||||
emojis.append(String(unicodeScalar))
|
||||
}
|
||||
}
|
||||
return emojis
|
||||
}
|
||||
}
|
||||
|
||||
func rejectContactRequestAlert(_ contactRequest: UserContactRequest) -> Alert {
|
||||
|
||||
Reference in New Issue
Block a user