Commit 2d911028 authored by  Joel  Oksanen's avatar Joel Oksanen
Browse files

Ability to dismiss options

parent df266b93
......@@ -23,17 +23,21 @@ class ChatManager: ObservableObject {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) {
self.sent = false
self.connectionManager.addMessage(message: query.message)
self.showingOptionsForMessage = nil
self.clearOptions()
}
}
func showOptionsFor(_ message: ADAMessage) {
showingOptionsForMessage = message
showingOptionsForMessage = showingOptionsForMessage == message ? nil : message
}
func showingOptionsFor(_ message: Message) -> Bool {
return message is ADAMessage && (message as! ADAMessage) == showingOptionsForMessage
}
func clearOptions() {
self.showingOptionsForMessage = nil
}
}
......@@ -46,7 +46,6 @@ struct FeatureView: View {
}
.frame(maxWidth: 280)
.fixedSize(horizontal: true, vertical: false)
.zIndex(-1)
}
.padding(EdgeInsets(top: 0, leading: 0, bottom: 15, trailing: 0))
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment